L4Re Operating System Framework – Interface and Usage Documentation
Loading...
Searching...
No Matches
inhibitor.h File Reference

Inhibitor C interface. More...

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

Go to the source code of this file.

Functions

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()

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

Acquire an inhibitor lock.

Parameters
capCapability for the Inhibitor object (see L4Re::Inhibitor)
idID of the inhibitor lock that shall be acquired.
reasonReason 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().

◆ 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
capCapability to the Inhibitor object (see L4Re::Inhibitor)
nameA pointer to a buffer for the name of the lock.
lenThe length of the available buffer (usually L4Re::Inhibitor::Name_max is used).
current_idThe ID of the last available lock, use -1 to get the first lock.
Return values
>0The ID of the next available lock if there is one (in this case name shall contain the name of the inhibitor lock).
-L4_ENODEVif there are no more locks.
<0Any other negative failure value.
See also
L4Re::Inhibitor::next_lock_info().

◆ l4re_inhibitor_release()

long l4re_inhibitor_release ( l4_cap_idx_t  cap,
l4_umword_t  id 
)

Release an inhibitor lock.

Parameters
capCapability for the Inhibitor object (see L4Re::Inhibitor).
idID of inhibitor that shall be released.
Returns
0 for success, <0 on error.
See also
L4Re::Inhibitor::release().