pub fn register_task(pid: u64, task: NonNull<Task>)
Register a task in the global PID-to-Task registry.