Implement getcpu syscall and add corresponding test application

This commit is contained in:
wheatfox
2025-02-25 17:24:28 +08:00
committed by Tate, Hongliang Tian
parent 9b8c6b5aa9
commit 6d42a07e95
8 changed files with 63 additions and 1 deletions

View File

@ -26,6 +26,7 @@ use crate::syscall::{
flock::sys_flock,
fsync::{sys_fdatasync, sys_fsync},
futex::sys_futex,
getcpu::sys_getcpu,
getcwd::sys_getcwd,
getdents64::sys_getdents64,
getegid::sys_getegid,
@ -225,6 +226,7 @@ impl_syscall_nums_and_dispatch_fn! {
SYS_GETRUSAGE = 165 => sys_getrusage(args[..2]);
SYS_UMASK = 166 => sys_umask(args[..1]);
SYS_PRCTL = 167 => sys_prctl(args[..5]);
SYS_GETCPU = 168 => sys_getcpu(args[..3]);
SYS_GETTIMEOFDAY = 169 => sys_gettimeofday(args[..1]);
SYS_GETPID = 172 => sys_getpid(args[..0]);
SYS_GETPPID = 173 => sys_getppid(args[..0]);