1 /*
2 * (c) 2008-2009 Adam Lackorzynski <adam@os.inf.tu-dresden.de>,
3 * Alexander Warg <warg@os.inf.tu-dresden.de>
4 * economic rights: Technische Universität Dresden (Germany)
5 *
6 * This file is part of TUD:OS and distributed under the terms of the
7 * GNU General Public License 2.
8 * Please see the COPYING-GPL-2 file for details.
9 *
10 * As a special exception, you may use this file as part of a free software
11 * library without restriction. Specifically, if other files instantiate
12 * templates or use macros or inline functions from this file, or you compile
13 * this file and link it with other files to produce an executable, this
14 * file does not by itself cause the resulting executable to be covered by
15 * the GNU General Public License. This exception does not however
16 * invalidate any other reasons why the executable file might be covered by
17 * the GNU General Public License.
18 */
19 #include <l4/re/env>
20 #include <l4/re/event>
21 #include <l4/re/c/event.h>
22
23 L4_CV long
l4re_event_get_buffer(const l4_cap_idx_t server,const l4_cap_idx_t ds)24 l4re_event_get_buffer(const l4_cap_idx_t server,
25 const l4_cap_idx_t ds) L4_NOTHROW
26 {
27 L4::Cap<L4Re::Event> x(server);
28 L4::Cap<L4Re::Dataspace> _ds(ds);
29 return x->get_buffer(_ds);
30 }
31
32 L4_CV long
l4re_event_get_num_streams(const l4_cap_idx_t server)33 l4re_event_get_num_streams(const l4_cap_idx_t server) L4_NOTHROW
34 {
35 L4::Cap<L4Re::Event> x(server);
36 return x->get_num_streams();
37 }
38
39
40 L4_CV long
l4re_event_get_stream_info(const l4_cap_idx_t server,int idx,l4re_event_stream_info_t * info)41 l4re_event_get_stream_info(const l4_cap_idx_t server,
42 int idx, l4re_event_stream_info_t *info) L4_NOTHROW
43 {
44 L4::Cap<L4Re::Event> x(server);
45 return x->get_stream_info(idx, static_cast<L4Re::Event_stream_info*>(info));
46 }
47
48 L4_CV long
l4re_event_get_stream_info_for_id(const l4_cap_idx_t server,l4_umword_t id,l4re_event_stream_info_t * info)49 l4re_event_get_stream_info_for_id(const l4_cap_idx_t server, l4_umword_t id,
50 l4re_event_stream_info_t *info) L4_NOTHROW
51 {
52 L4::Cap<L4Re::Event> x(server);
53 return x->get_stream_info_for_id(id, static_cast<L4Re::Event_stream_info*>(info));
54 }
55
56 L4_CV long
l4re_event_get_axis_info(const l4_cap_idx_t server,l4_umword_t id,unsigned naxes,unsigned const * axis,l4re_event_absinfo_t * info)57 l4re_event_get_axis_info(const l4_cap_idx_t server, l4_umword_t id,
58 unsigned naxes, unsigned const *axis,
59 l4re_event_absinfo_t *info) L4_NOTHROW
60 {
61 L4::Cap<L4Re::Event> x(server);
62 return x->get_axis_info(id, naxes, axis, info);
63 }
64