stub sys_clock_nanosleep

# Conflicts:
#	src/arch/arm64/exceptions/syscall.rs
This commit is contained in:
Ashwin Naren
2026-01-11 21:28:04 -08:00
parent ff13b392f1
commit bc68aae677
3 changed files with 22 additions and 2 deletions

View File

@@ -57,7 +57,7 @@ use crate::{
},
prctl::sys_prctl,
ptrace::{TracePoint, ptrace_stop, sys_ptrace},
sleep::sys_nanosleep,
sleep::{sys_clock_nanosleep, sys_nanosleep},
thread_group::{
Pgid,
pid::{sys_getpgid, sys_getpid, sys_getppid, sys_setpgid},
@@ -316,6 +316,14 @@ pub async fn handle_syscall() {
0x63 => sys_set_robust_list(TUA::from_value(arg1 as _), arg2 as _).await,
0x65 => sys_nanosleep(TUA::from_value(arg1 as _), TUA::from_value(arg2 as _)).await,
0x71 => sys_clock_gettime(arg1 as _, TUA::from_value(arg2 as _)).await,
0x73 => {
sys_clock_nanosleep(
arg1 as _,
TUA::from_value(arg2 as _),
TUA::from_value(arg3 as _),
)
.await
}
0x75 => {
sys_ptrace(
arg1 as _,

View File

@@ -9,3 +9,15 @@ pub async fn sys_nanosleep(rqtp: TUA<TimeSpec>, _rmtp: TUA<TimeSpec>) -> Result<
Ok(0)
}
pub async fn sys_clock_nanosleep(
_clock_id: i32,
rqtp: TUA<TimeSpec>,
_rmtp: TUA<TimeSpec>,
) -> Result<usize> {
let timespec = TimeSpec::copy_from_user(rqtp).await?;
sleep(timespec.into()).await;
Ok(0)
}