#include <l4_types.h>
Public Types | |
enum | { Invalid = 0xffffffff, Nil = 0x00000000 } |
The standard IDs. More... | |
enum | { Max_tasks = 1 << Task_size } |
must be constant since we build the spaces array from it More... | |
Public Member Functions | |
L4_uid () | |
Create an uninitialized UID. | |
L4_uid (Address addr, Address tcb_base, Address tcb_size) | |
Create an UID from an virtual address. | |
unsigned | version () const |
Extract the version part of the UID. | |
LThread_num | lthread () const |
Extract the task local thread-number. | |
GThread_num | gthread () const |
Extract the system global thread-number. | |
void | version (unsigned) |
Set the version part. | |
void | lthread (LThread_num) |
Set the local thread-number. | |
Mword | is_nil () const |
Is this a NIL ID? | |
Mword | is_invalid () const |
Is this the INVALID ID? | |
Mword | is_irq () const |
Is this a IRQ ID? | |
Mword | irq () const |
Get the IRQ number. | |
L4_uid | preemption_id () const |
Return preemption ID corresponding to ID. | |
bool | operator== (L4_uid o) const |
Test for equality. | |
bool | operator!= (L4_uid o) const |
Test for inequality. | |
L4_uid (Task_num task, LThread_num lthread) | |
Create a UID for the given task and thread. | |
Task_num | task () const |
Extract the task number. | |
void | task (Task_num) |
Set the task number. | |
Task_num | chief () const |
Extract the chief ID. | |
void | chief (Task_num) |
L4_uid | task_id () const |
bool | abs_rcv_timeout () const |
Check if receive timeout is absolute. | |
bool | abs_snd_timeout () const |
Check if send timeout is absolute. | |
bool | abs_rcv_clock () const |
Check if receive timeout clock bit set. | |
bool | abs_snd_clock () const |
Check if send timeout clock bit set. | |
bool | next_period () const |
Check if next_period bit is set. | |
bool | is_preemption () const |
Check if ID is a preemption ID. | |
Unsigned64 | raw () const |
Extract the raw 64Bit representation. | |
L4_uid (Unsigned64) | |
Create an L4-V2 UID from the raw 64Bit representation. | |
L4_uid (Task_num task, LThread_num lthread, unsigned site, Task_num chief, unsigned nest=0, unsigned version=0) | |
Create an L4-V2 UID. | |
unsigned | site () const |
Extract the V2-specific site ID. | |
void | site (unsigned) |
Set the V2-specific site ID. | |
unsigned | nest () const |
Extract the V2-specific Clans & Chiefs nesting level. | |
void | nest (unsigned) |
Set the V2-specific Clans & Chiefs nesting level. | |
Task_num | d_task () |
void | d_task (Mword num) |
LThread_num | d_thread () |
void | d_thread (Mword num) |
void | print (int task_format=0) const |
Static Public Member Functions | |
static L4_uid | irq (unsigned irq) |
Get the L4 UID for the given IRQ. | |
static unsigned const | threads_per_task () |
Get the maximum number of threads per task. | |
static Mword const | max_threads () |
Get number of threads in the system. | |
static Unsigned32 | lthread_from_gthread (GThread_num g) |
static Unsigned32 | task_from_gthread (GThread_num g) |
Private Types | |
enum | { Abs_rcv_mask = 0x1, Abs_snd_mask = 0x2, Abs_rcv_clock = 0x4, Abs_snd_clock = 0x8, Next_period = 0x10, Preemption_id = 0x20 } |
Bits used for absolute timeouts and RT scheduling. More... | |
enum | { Irq_mask = 0x00000000000000ffULL, Low_mask = 0x00000000ffffffffULL, Nil_mask = Low_mask, Version_low_mask = 0x00000000000003ffULL, Version_low_shift = 0, Version_low_size = 10, Lthread_mask = 0x000000000001fc00ULL, Lthread_shift = Version_low_shift + Version_low_size, Lthread_size = 7, Task_mask = 0x000000000ffe0000ULL, Task_shift = Lthread_shift + Lthread_size, Task_size = 11, Version_high_mask = 0x00000000f0000000ULL, Version_high_shift = Task_shift + Task_size, Version_high_size = 4, Site_mask = 0x0001ffff00000000ULL, Site_shift = Version_high_shift + Version_high_size, Site_size = 17, Chief_mask = 0x0ffe000000000000ULL, Chief_shift = Site_shift + Site_size, Chief_size = 11, Nest_mask = 0xf000000000000000ULL, Nest_shift = Chief_shift + Chief_size, Nest_size = 4 } |
Private Attributes | |
Unsigned64 | _raw |
This class encapsulates UIDs in L4. Theese IDs are used for threads, tasks, and IRQs.
This is the general interface to access L4 Version 2 and also L4 Version X.0 UIDs, like specified in the resp. L4 reference manuals.
|
Bits used for absolute timeouts and RT scheduling.
|
|
The standard IDs.
|
|
|
must be constant since we build the spaces array from it
|
|
Create an uninitialized UID.
|
|
Create an UID from an virtual address.
|
|
Create a UID for the given task and thread.
|
|
Create an L4-V2 UID from the raw 64Bit representation.
|
|
Create an L4-V2 UID.
|
|
Check if receive timeout clock bit set.
|
|
Check if receive timeout is absolute.
|
|
Check if send timeout clock bit set.
|
|
Check if send timeout is absolute.
|
|
|
|
Extract the chief ID.
|
|
|
|
|
|
|
|
|
|
Extract the system global thread-number.
|
|
Get the IRQ number.
|
|
Get the L4 UID for the given IRQ.
|
|
Is this the INVALID ID?
|
|
Is this a IRQ ID?
|
|
Is this a NIL ID?
|
|
Check if ID is a preemption ID.
|
|
Set the local thread-number.
|
|
Extract the task local thread-number.
|
|
|
|
Get number of threads in the system. This method only works for v2 and x0 ABI. To get the max_threads value ABI-independently, use Config::max_threads() instead. |
|
Set the V2-specific Clans & Chiefs nesting level.
|
|
Extract the V2-specific Clans & Chiefs nesting level.
|
|
Check if next_period bit is set.
|
|
Test for inequality.
|
|
Test for equality.
|
|
Return preemption ID corresponding to ID.
|
|
|
|
Extract the raw 64Bit representation.
|
|
Set the V2-specific site ID.
|
|
Extract the V2-specific site ID.
|
|
Set the task number.
|
|
Extract the task number.
|
|
|
|
|
|
Get the maximum number of threads per task.
|
|
Set the version part.
|
|
Extract the version part of the UID.
|
|
|