mirror of
https://github.com/rcore-os/rCore.git
synced 2024-11-22 08:06:17 +04:00
Fix sleeping and cleanup
This commit is contained in:
parent
8bc8ab19e2
commit
f0c418e969
@ -58,10 +58,10 @@ pub struct SignalAction {
|
||||
impl Debug for SignalAction {
|
||||
fn fmt(&self, f: &mut Formatter) -> Result<(), core::fmt::Error> {
|
||||
f.debug_struct("signal action")
|
||||
.field("handler", &format!("{:#x}", self.handler))
|
||||
.field("handler", &self.handler)
|
||||
.field("mask", &self.mask)
|
||||
.field("flags", &SignalActionFlags::from_bits_truncate(self.flags))
|
||||
.field("restorer", &format!("{:#x}", self.restorer))
|
||||
.field("restorer", &self.restorer)
|
||||
.finish()
|
||||
}
|
||||
}
|
||||
|
@ -137,13 +137,7 @@ impl Syscall<'_> {
|
||||
self.sys_sendfile(args[0], args[1], UserInOutPtr::from(args[2]), args[3])
|
||||
.await
|
||||
}
|
||||
SYS_FCNTL => {
|
||||
info!(
|
||||
"SYS_FCNTL : {} {:#x} {} {}",
|
||||
args[0], args[1], args[2], args[3]
|
||||
);
|
||||
self.sys_fcntl(args[0], args[1], args[2])
|
||||
}
|
||||
SYS_FCNTL => self.sys_fcntl(args[0], args[1], args[2]),
|
||||
SYS_FLOCK => self.sys_flock(args[0], args[1]),
|
||||
SYS_FSYNC => self.sys_fsync(args[0]),
|
||||
SYS_FDATASYNC => self.sys_fdatasync(args[0]),
|
||||
|
@ -402,7 +402,9 @@ impl Syscall<'_> {
|
||||
|
||||
// sleeping
|
||||
pub fn sleep_for(deadline: Duration) -> impl Future {
|
||||
SleepFuture { deadline }
|
||||
SleepFuture {
|
||||
deadline: timer_now() + deadline,
|
||||
}
|
||||
}
|
||||
|
||||
pub struct SleepFuture {
|
||||
|
@ -48,7 +48,7 @@ impl Syscall<'_> {
|
||||
}
|
||||
if !act.is_null() {
|
||||
let act = unsafe { self.vm().check_read_ptr(act)? };
|
||||
info!("new action: {:?}", act);
|
||||
info!("new action: {:x?}", act);
|
||||
proc.dispositions[signum] = *act;
|
||||
}
|
||||
Ok(0)
|
||||
|
Loading…
Reference in New Issue
Block a user