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)
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.
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.
20 #include <l4/re/c/dataspace.h>
22 #include <l4/re/mem_alloc>
23 #include <l4/re/dataspace>
25 #include <l4/sys/err.h>
29 l4re_ds_map(const l4re_ds_t ds, l4_addr_t offset, unsigned long flags,
30 l4_addr_t local_addr, l4_addr_t min_addr, l4_addr_t max_addr) L4_NOTHROW
32 L4::Cap<L4Re::Dataspace> x(ds);
33 return x->map(offset, flags, local_addr, min_addr, max_addr);
37 l4re_ds_map_region(const l4re_ds_t ds, l4_addr_t offset, unsigned long flags,
38 l4_addr_t min_addr, l4_addr_t max_addr) L4_NOTHROW
40 L4::Cap<L4Re::Dataspace> x(ds);
41 return x->map_region(offset, flags, min_addr, max_addr);
45 l4re_ds_clear(const l4re_ds_t ds, l4_addr_t offset, unsigned long size) L4_NOTHROW
47 L4::Cap<L4Re::Dataspace> x(ds);
48 return x->clear(offset, size);
52 l4re_ds_allocate(const l4re_ds_t ds,
53 l4_addr_t offset, l4_size_t size) L4_NOTHROW
55 L4::Cap<L4Re::Dataspace> x(ds);
56 return x->allocate(offset, size);
60 l4re_ds_copy_in(const l4re_ds_t ds, l4_addr_t dst_offs, const l4re_ds_t src,
61 l4_addr_t src_offs, unsigned long size) L4_NOTHROW
63 L4::Cap<L4Re::Dataspace> x(ds);
64 L4::Cap<L4Re::Dataspace> srcds(src);
65 return x->copy_in(dst_offs, srcds, src_offs, size);
70 l4re_ds_phys(const l4re_ds_t ds, l4_addr_t offset,
71 l4_addr_t *phys_addr, l4_size_t *phys_size) L4_NOTHROW
73 L4::Cap<L4Re::Dataspace> x(ds);
74 return x->phys(offset, *phys_addr, *phys_size);
78 l4re_ds_size(const l4re_ds_t ds) L4_NOTHROW
80 L4::Cap<L4Re::Dataspace> x(ds);
85 l4re_ds_info(const l4re_ds_t ds, l4re_ds_stats_t *stats) L4_NOTHROW
87 L4::Cap<L4Re::Dataspace> x(ds);
88 return x->info((L4Re::Dataspace::Stats *)stats);
92 l4re_ds_flags(const l4re_ds_t ds) L4_NOTHROW
94 L4::Cap<L4Re::Dataspace> x(ds);