MCPcopy Create free account
hub / github.com/chyyuu/os_kernel_lab / sys_getpid

Function sys_getpid

os/src/syscall/process.rs:26–28  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

24}
25
26pub fn sys_getpid() -> isize {
27 current_task().unwrap().process.upgrade().unwrap().getpid() as isize
28}
29
30pub fn sys_fork() -> isize {
31 let current_process = current_process();

Callers 1

syscallFunction · 0.70

Calls 2

current_taskFunction · 0.85
getpidMethod · 0.80

Tested by

no test coverage detected