3 * \brief Capability allocator C interface
6 * (c) 2008-2009 Adam Lackorzynski <adam@os.inf.tu-dresden.de>
7 * economic rights: Technische Universität Dresden (Germany)
9 * This file is part of TUD:OS and distributed under the terms of the
10 * GNU General Public License 2.
11 * Please see the COPYING-GPL-2 file for details.
13 * As a special exception, you may use this file as part of a free software
14 * library without restriction. Specifically, if other files instantiate
15 * templates or use macros or inline functions from this file, or you compile
16 * this file and link it with other files to produce an executable, this
17 * file does not by itself cause the resulting executable to be covered by
18 * the GNU General Public License. This exception does not however
19 * invalidate any other reasons why the executable file might be covered by
20 * the GNU General Public License.
25 * \defgroup api_l4re_c_util_cap Capability allocator
27 * \brief Capability allocator C interface.
30 #include <l4/sys/types.h>
31 #include <l4/sys/linkage.h>
32 #include <l4/sys/task.h>
37 * \brief Release a capability from a task (unmap).
38 * \ingroup api_l4re_c_util
40 * Note that the given capability does not need to be handled by the
41 * capability allocator in any way.
45 l4re_util_cap_release(l4_cap_idx_t cap);
51 l4re_util_cap_release(l4_cap_idx_t cap)
53 return l4_task_unmap(L4_BASE_TASK_CAP,
54 l4_obj_fpage(cap, 0, L4_FPAGE_RWX),