Expand description
Thread management implementation
Threads are the unit of execution within a process. Each thread has its own stack and CPU context but shares memory and other resources with its process.
Structs§
- Stack
- Stack information
- TaskPtr
- Safe wrapper for task pointer that implements Send + Sync
- Thread
- Thread control block
- Thread
Builder - Builder for creating new threads with specific configurations.
- Thread
Fs - Per-thread filesystem state for CLONE_FS support.
- Thread
Id - Thread ID type
- Thread
Local Storage - Thread Local Storage (TLS) data
- Thread
Params - Thread creation parameters
Enums§
- Thread
State - Thread state
Constants§
- DEFAULT_
KERNEL_ STACK_ PAGES - Default kernel stack size: 64KB (16 pages)
- DEFAULT_
TLS_ PAGES - Default TLS region size: 4KB (1 page)
- DEFAULT_
USER_ STACK_ PAGES - Default user stack size: 64KB (16 pages) for kernel-created threads User processes use the value from ProcessCreateOptions instead.
- GUARD_
PAGE_ COUNT - Guard page count (1 page below each stack to detect overflow)