⚠️ VeridianOS Kernel Documentation - This is low-level kernel code. All functions are unsafe unless explicitly marked otherwise. no_std

Module thread

Module thread 

Source
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
ThreadBuilder
Builder for creating new threads with specific configurations.
ThreadFs
Per-thread filesystem state for CLONE_FS support.
ThreadId
Thread ID type
ThreadLocalStorage
Thread Local Storage (TLS) data
ThreadParams
Thread creation parameters

Enums§

ThreadState
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)