97 {
return reinterpret_cast<Env*
>(l4re_global_env); }
153 {
return _env.first_free_cap; }
159 {
return _env.utcb_area; }
168 {
return _env.first_free_utcb; }
175 {
return _env.caps; }
196 template<
typename T >
211 template<
typename T >
213 {
return get_cap<T>(name, __builtin_strlen(name)); }
220 { _env.parent = c.cap(); }
226 { _env.mem_alloc = c.cap(); }
232 { _env.rm = c.cap(); }
238 { _env.log = c.cap(); }
244 { _env.main_thread = c.cap(); }
250 { _env.factory = c.cap(); }
256 { _env.first_free_cap = c; }
262 { _env.utcb_area = utcbs; }
268 { _env.first_free_utcb = u; }
283 { _env.scheduler = c.cap(); }
302 { _env.itas = c.cap(); }
328 { _env.caps = first; }
C++ interface of the initial environment that is provided to an L4 task.
L4::Cap< L4::Scheduler > scheduler() const noexcept
Get the scheduler capability for the task.
void first_free_cap(l4_cap_idx_t c) noexcept
Set first available capability selector.
Cap_entry const * get(char const *name, unsigned l) const noexcept
Get the Cap_entry for the object named name.
static Env const * env() noexcept
Returns the initial environment for the current task.
l4_cap_idx_t first_free_cap() const noexcept
First available capability selector.
void scheduler(L4::Cap< L4::Scheduler > const &c) noexcept
Set the scheduler capability.
L4::Cap< L4::Factory > factory() const noexcept
Object-capability to the factory object available to the task.
L4::Cap< Mem_alloc > mem_alloc() const noexcept
Object-capability to the memory allocator.
L4::Cap< L4::Factory > user_factory() const noexcept
Object-capability to the user-level object factory.
void log(L4::Cap< Log > const &c) noexcept
Set log object-capability.
L4::Cap< L4::Thread > main_thread() const noexcept
Object-capability of the first user thread.
void mem_alloc(L4::Cap< Mem_alloc > const &c) noexcept
Set memory allocator object-capability.
void factory(L4::Cap< L4::Factory > const &c) noexcept
Set factory object-capability.
L4::Cap< T > get_cap(char const *name) const noexcept
Get the capability selector for the object named name.
l4re_env_cap_entry_t Cap_entry
C++ type for an entry in the initial objects array.
Cap_entry const * initial_caps() const noexcept
Get a pointer to the first entry in the initial objects array.
L4::Cap< Log > log() const noexcept
Object-capability to the logging service.
L4::Cap< Dbg_events > dbg_events() const noexcept
Object-capability to a debugger events service.
void utcb_area(l4_fpage_t utcbs) noexcept
Set UTCB area of the task.
void first_free_utcb(l4_addr_t u) noexcept
Set first free UTCB.
L4::Cap< Rm > rm() const noexcept
Object-capability to the region map.
void initial_caps(Cap_entry *first) noexcept
Set the pointer to the first Cap_entry in the initial objects array.
L4::Cap< T > get_cap(char const *name, unsigned l) const noexcept
Get the capability selector for the object named name.
L4::Cap< Itas > itas() const noexcept
Object-capability to the ITAS services.
void rm(L4::Cap< Rm > const &c) noexcept
Set region map object-capability.
void dbg_events(L4::Cap< Dbg_events > const &dbg_events) noexcept
Set the dbg_events capability.
l4_addr_t first_free_utcb() const noexcept
First free UTCB.
L4::Cap< Parent > parent() const noexcept
Object-capability to the parent.
void itas(L4::Cap< Itas > const &c) noexcept
Set the ITAS capability.
l4_fpage_t utcb_area() const noexcept
UTCB area of the task.
void main_thread(L4::Cap< L4::Thread > const &c) noexcept
Set object-capability of first user thread.
void parent(L4::Cap< Parent > const &c) noexcept
Set parent object-capability.
L4::Cap< L4::Task > task() const noexcept
Object-capability of the user task.
C++ interface for capabilities.
C++ interface of the Scheduler kernel object, see Scheduler for the C interface.
l4re_env_cap_entry_t const * l4re_env_get_cap_l(char const *name, unsigned l, l4re_env_t const *e) L4_NOTHROW
Get the full l4re_env_cap_entry_t for the object named name.
unsigned long l4_addr_t
Address type.
unsigned long l4_cap_idx_t
Capability selector type.
@ L4_ENOENT
No such entity.
#define L4_EXPORT
Attribute to mark functions, variables, and data types as being exported from a library.
Common L4 ABI Data Types.
Memory allocator interface.
L4 low-level kernel interface.
Entry in the L4Re environment array for the named initial objects.
Initial environment data structure.