Loading...
Searching...
No Matches
thread.h
Go to the documentation of this file.
/*
* (c) 2013 Adam Lackorzynski <adam@os.inf.tu-dresden.de>,
* economic rights: Technische Universität Dresden (Germany)
*
* License: see LICENSE.spdx (in this directory or the directories above)
*/
#pragma once
#include_next <l4/sys/thread.h>
// Use the full documentation from ARM64. Otherwise \parameters and \return
// would occur twice in the Doxygen documentation of this function.
L4_INLINE l4_msgtag_t
l4_thread_arm_set_tpidruro(l4_cap_idx_t thread, l4_addr_t tpidruro) L4_NOTHROW;
L4_INLINE l4_msgtag_t
l4_thread_arm_set_tpidruro_u(l4_cap_idx_t thread, l4_addr_t tpidruro,
l4_utcb_t *utcb) L4_NOTHROW;
enum L4_thread_ex_regs_flags_arm
{
L4_THREAD_EX_REGS_ARM_SET_EL_MASK = 0x3 << 24,
L4_THREAD_EX_REGS_ARM_SET_EL_KEEP = 0x0 << 24,
L4_THREAD_EX_REGS_ARM_SET_EL_EL0 = 0x1 << 24,
L4_THREAD_EX_REGS_ARM_SET_EL_EL1 = 0x2 << 24,
};
/* IMPLEMENTATION -----------------------------------------------------------*/
L4_INLINE l4_msgtag_t
l4_thread_arm_set_tpidruro_u(l4_cap_idx_t thread, l4_addr_t tpidruro,
l4_utcb_t *utcb) L4_NOTHROW
{
l4_msg_regs_t *v = l4_utcb_mr_u(utcb);
v->mr[0] = L4_THREAD_ARM_TPIDRURO_OP;
v->mr[1] = tpidruro;
return l4_ipc_call(thread, utcb, l4_msgtag(L4_PROTO_THREAD, 2, 0, 0),
L4_IPC_NEVER);
}
L4_INLINE l4_msgtag_t
l4_thread_arm_set_tpidruro(l4_cap_idx_t thread, l4_addr_t tpidruro) L4_NOTHROW
{
return l4_thread_arm_set_tpidruro_u(thread, tpidruro, l4_utcb());
}
l4_thread_arm_set_tpidruro
l4_msgtag_t l4_thread_arm_set_tpidruro(l4_cap_idx_t thread, l4_addr_t tpidruro) L4_NOTHROW
Set the TPIDRURO thread specific register.
Definition thread.h:65
l4_addr_t
unsigned long l4_addr_t
Address type.
Definition l4int.h:34
l4_cap_idx_t
unsigned long l4_cap_idx_t
Capability selector type.
Definition types.h:336
l4_ipc_call
l4_msgtag_t l4_ipc_call(l4_cap_idx_t object, l4_utcb_t *utcb, l4_msgtag_t tag, l4_timeout_t timeout) L4_NOTHROW
Object call (usual invocation).
Definition ipc.h:565
l4_msgtag
l4_msgtag_t l4_msgtag(long label, unsigned words, unsigned items, unsigned flags) L4_NOTHROW
Create a message tag from the specified values.
Definition types.h:405
L4_PROTO_THREAD
@ L4_PROTO_THREAD
Protocol for messages to a thread object.
Definition types.h:54
L4_THREAD_ARM_TPIDRURO_OP
@ L4_THREAD_ARM_TPIDRURO_OP
Set TPIDRURO register.
Definition thread.h:745
L4_thread_ex_regs_flags_arm
L4_thread_ex_regs_flags_arm
Arm specific L4::Thread::ex_regs() flags.
Definition thread.h:40
L4_THREAD_EX_REGS_ARM_SET_EL_EL1
@ L4_THREAD_EX_REGS_ARM_SET_EL_EL1
Set exception level of thread to EL1 (sys mode).
Definition thread.h:48
L4_THREAD_EX_REGS_ARM_SET_EL_MASK
@ L4_THREAD_EX_REGS_ARM_SET_EL_MASK
Exception level set mask.
Definition thread.h:42
L4_THREAD_EX_REGS_ARM_SET_EL_EL0
@ L4_THREAD_EX_REGS_ARM_SET_EL_EL0
Set exception level of thread to EL0 (usr mode).
Definition thread.h:46
L4_THREAD_EX_REGS_ARM_SET_EL_KEEP
@ L4_THREAD_EX_REGS_ARM_SET_EL_KEEP
Keep current exception level of thread (default).
Definition thread.h:44
L4_IPC_NEVER
#define L4_IPC_NEVER
never timeout
Definition __timeout.h:76
l4_utcb_t
struct l4_utcb_t l4_utcb_t
Opaque type for the UTCB.
Definition utcb.h:56
l4_utcb
l4_utcb_t * l4_utcb(void) L4_NOTHROW L4_PURE
Get the UTCB address.
Definition utcb.h:346
L4_NOTHROW
#define L4_NOTHROW
Mark a function declaration and definition as never throwing an exception.
Definition compiler.h:161
L4_INLINE
#define L4_INLINE
L4 Inline function attribute.
Definition compiler.h:51
l4_msgtag_t
Message tag data structure.
Definition types.h:154
l4_msg_regs_t
Encapsulation of the message-register block in the UTCB.
Definition utcb.h:68
l4_msg_regs_t::mr
l4_umword_t mr[L4_UTCB_GENERIC_DATA_SIZE]
Message registers.
Definition utcb.h:69