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

Module process

Module process 

Source
Expand description

Process management module

This module provides the core process and thread management functionality for the VeridianOS microkernel, including:

  • Process Control Block (PCB) management
  • Thread creation and management
  • Process lifecycle (creation, termination, state transitions)
  • Global process table
  • Memory space management
  • Capability integration

Re-exports§

pub use lifecycle::exec_process;
pub use lifecycle::fork_process;
pub use lifecycle::wait_process as wait_for_child;
pub use pcb::Process;
pub use pcb::ProcessId;
pub use pcb::ProcessPriority;
pub use pcb::ProcessState;
pub use table::get_process;
pub use thread::Thread;
pub use thread::ThreadId;
pub use thread::ThreadState;
pub use crate::arch::context::ArchThreadContext;
pub use crate::arch::context::ThreadContext;

Modules§

creation
Process creation and setup
cwd
Per-Process Working Directory
exit
Process exit, cleanup, signals, and wait
fork
Process forking (copy-on-write)
lifecycle
Process lifecycle management
loader
User program loader
memory
Process memory management
pcb
Process Control Block (PCB) implementation
session
Session management for multi-user support
signal_delivery
Signal delivery to user-space signal handlers
sync
Process synchronization primitives
table
Global process table implementation
thread
Thread management implementation
wait
Process Wait/Exit Infrastructure

Constants§

MAX_PROCESSES
Maximum number of concurrent processes (including zombies awaiting reaping).
MAX_THREADS_PER_PROCESS
Maximum threads per process

Functions§

alloc_pid
Allocate a new process ID
alloc_tid
Allocate a new thread ID
block_thread
Block current thread
clear_boot_current
Clear the boot-launched process tracking.
create_thread
Create a new thread in the current process
current_process
Get current process
current_thread
Get current thread
exit_thread
Exit current thread
find_process
Find process by ID
get_current_process
Get current process (alias for compatibility)
get_process_list
Get a list of all process IDs
get_thread_tid
Get current thread ID
init
Initialize process management subsystem (legacy)
init_without_init_process
Initialize process management subsystem without creating init process
set_boot_current
Register a boot-launched process as the current process.
set_thread_affinity
Set thread CPU affinity
terminate_thread
Terminate a specific thread
wake_thread
Wake up a thread
yield_thread
Yield current thread