Expand description
Thread-associated operations.
Re-exports§
pub use crate::thread::futex::Flags as FutexFlags;
pub use crate::thread::futex::OWNER_DIED as FUTEX_OWNER_DIED;
pub use crate::thread::futex::WAITERS as FUTEX_WAITERS;
Modules§
Structs§
SECBIT_*
.CAP_*
constants.__user_cap_data_struct
gid_t
—A Unix group ID.pid_t
—A non-zero Unix process ID.- Scalable Vector Extension vector length configuration.
- Zero means addresses that are passed for the purpose of being dereferenced by the kernel must be untagged.
- Thread name space type.
uid_t
—A Unix user ID.CLONE_*
for use withunshare
.
Enums§
- Linux per-thread capability.
CLOCK_*
constants for use withclock_gettime
.PR_SCHED_CORE_SCOPE_*
.FUTEX_*
operations for use with thefutex
function.- Type of name space referred to by a link.
- A return type for
nanosleep
andclock_nanosleep_relative
. SECCOMP_MODE_*
.- Value of the fast switch flag controlling system calls user dispatch mechanism without the need to issue a syscall.
Functions§
capget(_LINUX_CAPABILITY_VERSION_3, pid)
- Get the
securebits
flags of the calling thread. - Check if the specified capability is in the ambient set.
- Check if the specified capability is in the calling thread’s capability bounding set.
- Remove all capabilities from the ambient set.
clock_nanosleep(id, TIMER_ABSTIME, request, NULL)
—Sleeps until an absolute time on a given clock.clock_nanosleep(id, 0, request, remain)
—Sleeps for a duration on a given clock.- Add or remove the specified capability to the ambient set.
- Get core scheduling cookie of a process.
- Create unique core scheduling cookie.
- Get the current tagged address mode for the calling thread.
- Get the
current
timer slack value of the calling thread. - Disable Syscall User Dispatch mechanism.
- Set the state of the
THP disable
flag for the calling thread. - Enable Syscall User Dispatch mechanism.
- DEPRECATED: There are now individual functions available to perform futex operations with improved type safety. See the futex module.
- Get the
clear_child_tid
address set byset_tid_address
andclone
’sCLONE_CHILD_CLEARTID
flag. - Get the current state of the calling thread’s
keep capabilities
flag. gettid()
—Returns the thread ID.- Reassociate the calling thread with the namespace associated with link referred to by
fd
. - Atomically move the calling thread into one or more of the same namespaces as the thread referred to by
fd
. - Get the name of the calling thread.
nanosleep(request, remain)
—Sleeps for a duration.- Get the value of the
no_new_privs
attribute for the calling thread. - Pull core scheduling cookie from a process.
- Push core scheduling cookie to a process.
- If the calling thread has the
Capability::SetPermittedCapabilities
capability within its user namespace, then drop the specified capability from the thread’s capability bounding set. - Securely reset the thread’s pointer authentication keys to fresh random values generated by the kernel.
capset(_LINUX_CAPABILITY_VERSION_3, pid, effective, permitted, inheritable)
- Set the
securebits
flags of the calling thread. - Controls support for passing tagged user-space addresses to the kernel.
- Sets the
current
timer slack value for the calling thread. - Set the state of the calling thread’s
keep capabilities
flag. - Set the name of the calling thread.
- Set the calling thread’s
no_new_privs
attribute. - Set the secure computing mode for the calling thread, to limit the available system calls.
- Configure the thread’s vector length of Scalable Vector Extension.
setgid(gid)
setgroups(groups)
-Sets the supplementary group IDs for the calling thread.setresgid(rgid, egid, sgid)
setresuid(ruid, euid, suid)
setuid(uid)
- Get the thread’s current SVE vector length configuration.
- Get the current setting of the
THP disable
flag for the calling thread. unshare(flags)
—Disassociate parts of the current thread’s execution context with other threads.