Skip to main content Skip to main content
Pigweed's logo Pigweed
code_xml
  1. Home
  2. Reference
  3. Rust
  4. pw_kernel
  5. kernel
  6. handle_syscall

handle_syscall

Function handle_syscall 

Source
pub fn handle_syscall<'a, K: Kernel>(
    kernel: K,
    id: u16,
    args: K::SyscallArgs<'a>,
) -> SysCallReturnValue
Expand description

Handle a system call.

This is the architecture-independent entry point for system calls.

§Requirements

The architecture-specific code calling this function MUST check if the current thread is terminating before returning to userspace (e.g., by calling kernel::interrupt_controller::handle_thread_termination). Since in-kernel thread termination is advisory, this ensures that terminating threads actually exit instead of returning to userspace.