Expand description
Thread-associated operations.
Modules§
- futex
- Linux
futex.
Structs§
- Capabilities
Secure Bits SECBIT_*- Capability
Flags CAP_*constants.- Capability
Sets __user_cap_data_struct- CpuSet
CpuSetrepresents a bit-mask of CPUs.- Cpuid
- A Linux CPU ID.
- Gid
gid_t—A Unix group ID.- Membarrier
Query - A result from
membarrier_query. - Pid
pid_t—A non-zero Unix process ID.- SVEVector
Length Config - Scalable Vector Extension vector length configuration.
- Tagged
Address Mode - Zero means addresses that are passed for the purpose of being dereferenced by the kernel must be untagged.
- Thread
Name Space Type - Thread name space type.
- Timespec
struct timespec—A quantity of time in seconds plus nanoseconds.- Uid
uid_t—A Unix user ID.- Unshare
Flags CLONE_*for use withunshare.
Enums§
- Capability
- Linux per-thread capability.
- ClockId
CLOCK_*constants for use withclock_gettime.- Core
Scheduling Scope PR_SCHED_CORE_SCOPE_*- Link
Name Space Type - Type of name space referred to by a link.
- Membarrier
Command - A command for use with
membarrierandmembarrier_cpu. - Nanosleep
Relative Result - A return type for
nanosleepandclock_nanosleep_relative. - Secure
Computing Mode SECCOMP_MODE_*- SysCall
User Dispatch Fast Switch - Value of the fast switch flag controlling system calls user dispatch mechanism without the need to issue a syscall.
Functions§
- capabilities
capget(_LINUX_CAPABILITY_VERSION_3, pid)- capabilities_
secure_ bits - Get the
securebitsflags of the calling thread. - capability_
is_ in_ ambient_ set - Check if the specified capability is in the ambient set.
- capability_
is_ in_ bounding_ set - Check if the specified capability is in the calling thread’s capability bounding set.
- clear_
ambient_ capability_ set - Remove all capabilities from the ambient set.
- clock_
nanosleep_ absolute clock_nanosleep(id, TIMER_ABSTIME, request, NULL)—Sleeps until an absolute time on a given clock.- clock_
nanosleep_ relative clock_nanosleep(id, 0, request, remain)—Sleeps for a duration on a given clock.- configure_
capability_ in_ ambient_ set - Add or remove the specified capability to the ambient set.
- core_
scheduling_ cookie - Get core scheduling cookie of a process.
- create_
core_ scheduling_ cookie - Create unique core scheduling cookie.
- current_
tagged_ address_ mode - Get the current tagged address mode for the calling thread.
- current_
timer_ slack - Get the
currenttimer slack value of the calling thread. - disable_
syscall_ ⚠user_ dispatch - Disable Syscall User Dispatch mechanism.
- disable_
transparent_ huge_ pages - Set the state of the
THP disableflag for the calling thread. - enable_
syscall_ ⚠user_ dispatch - Enable Syscall User Dispatch mechanism.
- get_
clear_ child_ tid_ address - Get the
clear_child_tidaddress set byset_tid_addressandclone’sCLONE_CHILD_CLEARTIDflag. - get_
keep_ capabilities - Get the current state of the calling thread’s
keep capabilitiesflag. - gettid
gettid()—Returns the thread ID.- membarrier
membarrier(cmd, 0, 0)—Perform a memory barrier.- membarrier_
cpu membarrier(cmd, MEMBARRIER_CMD_FLAG_CPU, cpu)—Perform a memory barrier with a specific CPU.- membarrier_
query membarrier(MEMBARRIER_CMD_QUERY, 0, 0)—Query the supportedmembarriercommands.- move_
into_ link_ name_ space - Reassociate the calling thread with the namespace associated with link
referred to by
fd. - move_
into_ thread_ name_ spaces - Atomically move the calling thread into one or more of the same namespaces
as the thread referred to by
fd. - name
- Get the name of the calling thread.
- nanosleep
nanosleep(request, remain)—Sleeps for a duration.- no_
new_ privs - Get the value of the
no_new_privsattribute for the calling thread. - pull_
core_ scheduling_ cookie - Pull core scheduling cookie from a process.
- push_
core_ scheduling_ cookie - Push core scheduling cookie to a process.
- remove_
capability_ from_ bounding_ set - If the calling thread has the
Capability::SetPermittedCapabilitiescapability within its user namespace, then drop the specified capability from the thread’s capability bounding set. - reset_
pointer_ ⚠authentication_ keys - Securely reset the thread’s pointer authentication keys to fresh random values generated by the kernel.
- sched_
getaffinity sched_getaffinity(pid)—Get a thread’s CPU affinity mask.- sched_
getcpu sched_getcpu()—Get the CPU that the current thread is currently on.- sched_
setaffinity sched_setaffinity(pid, cpuset)—Set a thread’s CPU affinity mask.- sched_
yield sched_yield()—Hints to the OS that other processes should run.- secure_
computing_ mode - Get the secure computing mode of the calling thread.
- set_
capabilities capset(_LINUX_CAPABILITY_VERSION_3, pid, effective, permitted, inheritable)- set_
capabilities_ secure_ bits - Set the
securebitsflags of the calling thread. - set_
current_ ⚠tagged_ address_ mode - Controls support for passing tagged user-space addresses to the kernel.
- set_
current_ timer_ slack - Sets the
currenttimer slack value for the calling thread. - set_
keep_ capabilities - Set the state of the calling thread’s
keep capabilitiesflag. - set_
name - Set the name of the calling thread.
- set_
no_ new_ privs - Set the calling thread’s
no_new_privsattribute. - set_
secure_ computing_ mode - Set the secure computing mode for the calling thread, to limit the available system calls.
- set_
sve_ ⚠vector_ length_ configuration - Configure the thread’s vector length of Scalable Vector Extension.
- set_
thread_ gid setgid(gid)—Sets the effective group ID of the current thread.- set_
thread_ groups setgroups(groups)—Sets the supplementary group IDs for the calling thread.- set_
thread_ res_ gid setresgid(rgid, egid, sgid)—Sets the real, effective, and saved group ID of the current thread.- set_
thread_ res_ uid setresuid(ruid, euid, suid)—Sets the real, effective, and saved user ID of the calling thread.- set_
thread_ uid setuid(uid)—Sets the effective user ID of the calling thread.- sve_
vector_ length_ configuration - Get the thread’s current SVE vector length configuration.
- transparent_
huge_ pages_ are_ disabled - Get the current setting of the
THP disableflag for the calling thread. - unshare
Deprecated unshare(flags)—Deprecated in favor ofunshare_unsafe.- unshare_
unsafe ⚠ unshare(flags)—Disassociate parts of the current thread’s execution context with other threads.