feat: alarm系统调用实现 (#710)

* alarm系统调用实现
This commit is contained in:
SMALLC
2024-04-16 21:34:36 +08:00
committed by GitHub
parent d623e90231
commit fbd63a301c
14 changed files with 398 additions and 2 deletions

View File

@ -1055,6 +1055,11 @@ impl Syscall {
Err(SystemError::EINVAL)
}
SYS_ALARM => {
let second = args[0] as u32;
Self::alarm(second)
}
SYS_SHMGET => {
let key = ShmKey::new(args[0]);
let size = args[1];

View File

@ -28,7 +28,7 @@
#define SYS_DUP2 33
#define SYS_NANOSLEEP 35
#define SYS_ALARM 37
#define SYS_GETPID 39
#define SYS_SOCKET 41