L4Re - L4 Runtime Environment
Initial Environment

C interface of the initial environment that is provided to an L4 task. More...

+ Collaboration diagram for Initial Environment:

Data Structures

struct  l4re_env_cap_entry_t
 Entry in the L4Re environment array for the named inital objects. More...
 

Typedefs

typedef struct l4re_env_cap_entry_t l4re_env_cap_entry_t
 Entry in the L4Re environment array for the named inital objects.
 

Functions

l4re_env_tl4re_env (void) L4_NOTHROW
 Get L4Re initial environment. More...
 
l4_kernel_info_tl4re_kip (void) L4_NOTHROW
 Get Kernel Info Page. More...
 
l4_cap_idx_t l4re_env_get_cap (char const *name) L4_NOTHROW
 Get the capability selector for the object named name. More...
 
l4_cap_idx_t l4re_env_get_cap_e (char const *name, l4re_env_t const *e) L4_NOTHROW
 Get the capability selector for the object named name. More...
 
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. More...
 

Detailed Description

C interface of the initial environment that is provided to an L4 task.

Include File
#include <l4/re/env.h>

For an explanation of the default task capabilites see l4_default_caps_t.

For the C++ interface refer to L4Re::Env.

Function Documentation

◆ l4re_env()

l4re_env_t * l4re_env ( void  )
inline

Get L4Re initial environment.

Returns
Pointer to L4Re initial environment.
Examples:
examples/sys/aliens/main.c, examples/sys/isr/main.c, examples/sys/singlestep/main.c, examples/sys/start-with-exc/main.c, and examples/sys/utcb-ipc/main.c.

Definition at line 184 of file env.h.

Referenced by l4re_env_get_cap().

+ Here is the caller graph for this function:

◆ l4re_env_get_cap()

l4_cap_idx_t l4re_env_get_cap ( char const *  name)
inline

Get the capability selector for the object named name.

Parameters
nameis the name of the object to lookup in the initial objects.
Returns
A valid capability selector if the object exists or an invalid capability selector if not (l4_is_invalid_cap()).
Examples:
examples/sys/isr/main.c.

Definition at line 226 of file env.h.

References l4re_env(), l4re_env_get_cap_e(), and l4re_env_cap_entry_t::name.

+ Here is the call graph for this function:

◆ l4re_env_get_cap_e()

l4_cap_idx_t l4re_env_get_cap_e ( char const *  name,
l4re_env_t const *  e 
)
inline

Get the capability selector for the object named name.

Parameters
nameis the name of the object to lookup in the initial objects.
eis the environment structure to use for the operation.
Returns
A valid capability selector if the object exists or an invalid capability selector if not (l4_is_invalid_cap()).

Definition at line 213 of file env.h.

References l4re_env_cap_entry_t::cap, L4_INVALID_CAP, l4re_env_get_cap_l(), and l4re_env_cap_entry_t::name.

Referenced by l4re_env_get_cap().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ l4re_env_get_cap_l()

l4re_env_cap_entry_t const * l4re_env_get_cap_l ( char const *  name,
unsigned  l,
l4re_env_t const *  e 
)
inline

Get the full l4re_env_cap_entry_t for the object named name.

Parameters
nameis the name of the object to lookup in the initial objects.
lis the length of the name string, thus name might not be zero terminated.
eis the environment structure to use for the operation.
Returns
A pointer to an l4re_env_cap_entry_t if the object exists or NULL if not.

Definition at line 195 of file env.h.

References l4re_env_cap_entry_t::flags, and l4re_env_cap_entry_t::name.

Referenced by l4re_env_get_cap_e().

+ Here is the caller graph for this function:

◆ l4re_kip()

l4_kernel_info_t * l4re_kip ( void  )
inline

Get Kernel Info Page.

Returns
Pointer to Kernel Info Page (KIP) structure.
Examples:
examples/sys/aliens/main.c, and examples/sys/ux-vhw/main.c.

Definition at line 188 of file env.h.