104 {
return reinterpret_cast<Env*
>(l4re_global_env); }
182 {
return _env.
caps; }
203 template<
typename T >
218 template<
typename T >
220 {
return get_cap<T>(name, __builtin_strlen(name)); }
227 { _env.
parent = c.cap(); }
239 { _env.
rm = c.cap(); }
245 { _env.
log = c.cap(); }
297 { _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.
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.
void rm(L4::Cap< Rm > const &c) noexcept
Set region map object-capability.
l4_addr_t first_free_utcb() const noexcept
First free UTCB.
L4::Cap< Parent > parent() const noexcept
Object-capability to the parent.
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.
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 inital objects.
Initial environment data structure.
l4_cap_idx_t factory
Object-capability of the factory available to the task.
l4_cap_idx_t mem_alloc
Memory allocator object-capability.
l4_cap_idx_t scheduler
Object capability for the scheduler set to use.
l4_cap_idx_t rm
Region map object-capability.
l4_addr_t first_free_utcb
First UTCB within the UTCB area available to the application.
l4_cap_idx_t first_free_cap
First capability index available to the application.
l4re_env_cap_entry_t * caps
Pointer to the first entry in the initial objects array which contains l4re_env_cap_entry_t elements.
l4_cap_idx_t main_thread
Object-capability of the first user thread.
l4_fpage_t utcb_area
UTCB area of the task.
l4_cap_idx_t parent
Parent object-capability.
l4_cap_idx_t log
Logging object-capability.