L4Re Operating System Framework
Interface and Usage Documentation
Loading...
Searching...
No Matches
Thread groups

C thread group interface, see L4::Thread_group for the C++ interface. More...

Collaboration diagram for Thread groups:

Enumerations

enum  L4_thread_group_ops { L4_THREAD_GROUP_ADD_OP = 2UL , L4_THREAD_GROUP_REMOVE_OP = 3UL }
 Operations on the Thread_group object. More...
enum  L4_thread_group_policy { L4_THREAD_GROUP_POLICY_STRICT_CORE_LOCAL = 0 , L4_THREAD_GROUP_POLICY_SOFT_CORE_LOCAL = 1 }
 Thread group policy. More...

Functions

l4_msgtag_t l4_thread_group_add (l4_cap_idx_t tg, l4_cap_idx_t thread) L4_NOTHROW
 Add thread to a thread group.
l4_msgtag_t l4_thread_group_remove (l4_cap_idx_t tg, l4_cap_idx_t thread) L4_NOTHROW
 Remove thread from a thread group.

Detailed Description

C thread group interface, see L4::Thread_group for the C++ interface.

An L4 thread group is a collection of threads used as indirection for IPC gate and IRQ objects such that these objects can have multiple receivers, from which the kernel selects one according to a policy.

The primary use case for thread groups are multi-threaded servers and CPU core local IRQ / IPC delivery.

A thread can be bound to at most one thread group. Before binding a thread to a thread group, the thread must be bound to a task. All threads bound to the same thread group must belong to the same task.

Enumeration Type Documentation

◆ L4_thread_group_ops

Operations on the Thread_group object.

Enumerator
L4_THREAD_GROUP_ADD_OP 

Add thread to thread group.

L4_THREAD_GROUP_REMOVE_OP 

Remove thread from thread group.

Definition at line 40 of file thread_group.h.

◆ L4_thread_group_policy

Thread group policy.

Define how to select a suitable thread from the thread group.

Enumerator
L4_THREAD_GROUP_POLICY_STRICT_CORE_LOCAL 

Use a thread on the same CPU core.

Fail if no such thread is available.

L4_THREAD_GROUP_POLICY_SOFT_CORE_LOCAL 

Prefer a thread on the same CPU core.

Fall-back to another thread of the group if no such thread is available.

Definition at line 52 of file thread_group.h.

Function Documentation

◆ l4_thread_group_add()

l4_msgtag_t l4_thread_group_add ( l4_cap_idx_t tg,
l4_cap_idx_t thread )
inline

Add thread to a thread group.

Parameters
tgThread group object.
threadThread to add to the thread group.

Definition at line 135 of file thread_group.h.

References L4_NOTHROW, and l4_utcb().

Here is the call graph for this function:

◆ l4_thread_group_remove()

l4_msgtag_t l4_thread_group_remove ( l4_cap_idx_t tg,
l4_cap_idx_t thread )
inline

Remove thread from a thread group.

Parameters
tgThread group object.
threadThread to remove from the thread group.

Definition at line 142 of file thread_group.h.

References L4_NOTHROW, and l4_utcb().

Here is the call graph for this function: