1 /*
2 * (c) 2008-2009 Adam Lackorzynski <adam@os.inf.tu-dresden.de>
3 * economic rights: Technische Universität Dresden (Germany)
4 *
5 * This file is part of TUD:OS and distributed under the terms of the
6 * GNU General Public License 2.
7 * Please see the COPYING-GPL-2 file for details.
8 *
9 * As a special exception, you may use this file as part of a free software
10 * library without restriction. Specifically, if other files instantiate
11 * templates or use macros or inline functions from this file, or you compile
12 * this file and link it with other files to produce an executable, this
13 * file does not by itself cause the resulting executable to be covered by
14 * the GNU General Public License. This exception does not however
15 * invalidate any other reasons why the executable file might be covered by
16 * the GNU General Public License.
17 */
18 #include <l4/re/env>
19 #include <l4/re/namespace>
20 #include <l4/re/c/namespace.h>
21
l4re_ns_query_to_srv(l4_cap_idx_t srv,char const * name,l4_cap_idx_t const cap,int timeout)22 long l4re_ns_query_to_srv(l4_cap_idx_t srv, char const *name,
23 l4_cap_idx_t const cap, int timeout) L4_NOTHROW
24 {
25 L4::Cap<L4Re::Namespace> x(srv);
26 return x->query(name, L4::Cap<void>(cap), timeout);
27 }
28
l4re_ns_register_obj_srv(l4_cap_idx_t srv,const char * name,l4_cap_idx_t const obj,unsigned flags)29 long l4re_ns_register_obj_srv(l4_cap_idx_t srv,
30 const char* name, l4_cap_idx_t const obj,
31 unsigned flags) L4_NOTHROW
32 {
33 L4::Cap<L4Re::Namespace> x(srv);
34 return x->register_obj(name, L4::Ipc::Cap<void>::from_ci(obj), flags);
35 }
36