L4Re Operating System Framework
Interface and Usage Documentation
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
thread_group
Go to the documentation of this file.
1// vi:set ft=cpp: -*- Mode: C++ -*-
2/*
3 * Copyright (C) 2022-2025 Kernkonzept GmbH.
4 * Author(s): Adam Lackorzynski <adam@os.inf.tu-dresden.de>
5 * Frank Mehnert <frank.mehnert@kernkonzept.com>
6 *
7 * License: see LICENSE.spdx (in this directory or the directories above)
8 */
12#pragma once
13
14#include <l4/sys/capability>
15#include <l4/sys/thread_group.h>
16
17namespace L4 {
18
35 public Kobject_t<Thread_group, Snd_destination, L4_PROTO_THREAD_GROUP,
36 Type_info::Demand_t<1>>
37{
38public:
53 l4_msgtag_t add(Cap<Thread> thread, l4_utcb_t *utcb = l4_utcb()) noexcept
54 { return l4_thread_group_add_u(cap(), thread.cap(), utcb); }
55
67 l4_msgtag_t remove(Cap<Thread> thread, l4_utcb_t *utcb = l4_utcb()) noexcept
68 { return l4_thread_group_remove_u(cap(), thread.cap(), utcb); }
69};
70
71}
L4::Cap related definitions.
l4_cap_idx_t cap() const noexcept
Return capability selector.
Definition capability.h:49
C++ interface for capabilities.
Definition capability.h:224
Helper class to create an L4Re interface class that is derived from a single base class.
Definition __typeinfo.h:750
C++ L4 kernel thread group interface, see Thread groups for the C interface.
Definition thread_group:37
l4_msgtag_t add(Cap< Thread > thread, l4_utcb_t *utcb=l4_utcb()) noexcept
Add thread to a thread group.
Definition thread_group:53
l4_msgtag_t remove(Cap< Thread > thread, l4_utcb_t *utcb=l4_utcb()) noexcept
Remove thread from a thread group.
Definition thread_group:67
struct l4_utcb_t l4_utcb_t
Opaque type for the UTCB.
Definition utcb.h:56
l4_utcb_t * l4_utcb(void) L4_NOTHROW L4_PURE
Get the UTCB address.
Definition utcb.h:346
#define L4_EXPORT
Attribute to mark functions, variables, and data types as being exported from a library.
Definition compiler.h:214
L4 low-level kernel interface.
Message tag data structure.
Definition types.h:154