Loading...
Searching...
No Matches
inhibitor.h File Reference
L4Re C Interface

Inhibitor C interface. More...

`#include <l4/sys/compiler.h>`
`#include <l4/sys/types.h>`
Include dependency graph for inhibitor.h:

Go to the source code of this file.

## Functions

L4_BEGIN_DECLS long | l4re_inhibitor_acquire (l4_cap_idx_t cap, l4_umword_t id, char const *reason)
| Acquire an inhibitor lock.
long | l4re_inhibitor_release (l4_cap_idx_t cap, l4_umword_t id)
| Release an inhibitor lock.
long | l4re_inhibitor_next_lock_info (l4_cap_idx_t cap, char *name, unsigned len, l4_mword_t current_id)
| Get information for the next available inhibitor lock.

## Detailed Description

Inhibitor C interface.

Definition in file inhibitor.h.

## Function Documentation

## l4re_inhibitor_acquire()

L4_BEGIN_DECLS long l4re_inhibitor_acquire | ( | l4_cap_idx_t | cap,
|  | l4_umword_t | id,
|  | char const * | reason )

Acquire an inhibitor lock.

Parameters

  cap | Capability for the Inhibitor object (see L4Re::Inhibitor)
  id | ID of the inhibitor lock that shall be acquired.
  reason | Reason why the inhibitor lock is acquired. (Used for informing the user or debugging.)

Returns
  0 for success, <0 on error.

See also
  L4Re::Inhibitor::acquire().

References L4_CV, and L4_EXPORT.

## l4re_inhibitor_next_lock_info()

long l4re_inhibitor_next_lock_info | ( | l4_cap_idx_t | cap,
|  | char * | name,
|  | unsigned | len,
|  | l4_mword_t | current_id )

Get information for the next available inhibitor lock.

Parameters

  cap | Capability to the Inhibitor object (see L4Re::Inhibitor)
  name | A pointer to a buffer for the name of the lock.
  len | The length of the available buffer (usually L4Re::Inhibitor::Name_max is used).
  current_id | The ID of the last available lock, use -1 to get the first lock.

Return values

  >0 | The ID of the next available lock if there is one (in this case name shall contain the name of the inhibitor lock).
  -L4_ENODEV | if there are no more locks.
  <0 | Any other negative failure value.

See also
  L4Re::Inhibitor::next_lock_info().

References L4_END_DECLS.

## l4re_inhibitor_release()

long l4re_inhibitor_release | ( | l4_cap_idx_t | cap,
|  | l4_umword_t | id )

Release an inhibitor lock.

Parameters

  cap | Capability for the Inhibitor object (see L4Re::Inhibitor).
  id | ID of inhibitor that shall be released.

Returns
  0 for success, <0 on error.

See also
  L4Re::Inhibitor::release().

References L4_CV, and L4_EXPORT.