32 namespace L4Re {
namespace Util {
45 enum State { Free = 0, Allocated, Unknown };
47 throw() : _bias(bias), _items(max, mem) {}
51 long cap = _items.alloc();
58 long hint()
const {
return _items.hint(); }
63 template<
typename T >
75 return _items.is_allocated(idx) ? Allocated : Free;
101 { (void)task; (void)unmap_flags;
return false; }
105 return _items.size() + _bias - 1;
109 template<
long Size >
116 explicit Cap_alloc(
long bias = 0)
throw()
Invalid capability selector.
Helper abstraction for a word contained in the bitmap.
l4_msgtag_t l4_task_unmap(l4_cap_idx_t task, l4_fpage_t fpage, l4_umword_t map_mask) L4_NOTHROW
Revoke rights from the task.
unsigned l4_is_valid_cap(l4_cap_idx_t c) L4_NOTHROW
Test if a capability selector is a valid selector.
unsigned long l4_cap_idx_t
L4 Capability selector Type.
L4::Cap related definitions.
T1 max(T1 a, T1 b)
Get the maximum of a and b.
Flag to tell the unmap operation to unmap all child mappings including the mapping in the invoked tas...
l4_cap_idx_t cap() const
Return capability selector.
unsigned long l4_umword_t
Unsigned machine word.
Common task related definitions.
C++ interface for capabilities.
void free(L4::Cap< T > const &cap, l4_cap_idx_t task=L4_INVALID_CAP, l4_umword_t unmap_flags=L4_FP_ALL_SPACES)
Free a capability slot.
L4::Cap< T > alloc()
Allocate a capability slot.