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