Loading...
Searching...
No Matches
Initial Environment
L4Re C Interface

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 initial objects. More...

## Typedefs

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

## Functions

l4re_env_t * | l4re_env (void) L4_NOTHROW
| Get L4Re initial environment.
l4_kernel_info_t const * | l4re_kip (void) L4_NOTHROW
| Get Kernel Info Page.
l4_cap_idx_t | l4re_env_get_cap (char const *name) L4_NOTHROW
| Get the capability selector for the object named name.
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.
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.

## Detailed Description

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

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

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 181 of file env.h.

References L4_NOTHROW.

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

  name | is 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()).

Definition at line 220 of file env.h.

References L4_NOTHROW, l4re_env(), and l4re_env_get_cap_e().

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

  name | is the name of the object to lookup in the initial objects.
  e | is 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 207 of file env.h.

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

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

  name | is the name of the object to lookup in the initial objects.
  l | is the length of the name string, thus name might not be zero terminated.
  e | is 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 189 of file env.h.

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

Referenced by L4Re::Env::get(), and l4re_env_get_cap_e().

Here is the caller graph for this function:

## l4re_kip()

l4_kernel_info_t const * l4re_kip | ( | void |  | ) |

inline

Get Kernel Info Page.

Returns
  Pointer to Kernel Info Page (KIP) structure.

Examples
  examples/libs/shmc/prodcons.c, and examples/sys/aliens/main.c.

Definition at line 185 of file env.h.

References l4_kip(), and L4_NOTHROW.

Referenced by L4::Poll_timeout_kipclock::set(), and L4::Poll_timeout_kipclock::test().

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