Skip to content

Commit

Permalink
signal: Restart read/write on EINTR
Browse files Browse the repository at this point in the history
  • Loading branch information
rafalmiel committed Oct 19, 2023
1 parent 2fa6e24 commit 40955fe
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions cykusz-rs/src/kernel/syscall/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ pub fn syscall_handler(num: u64, a: u64, b: u64, c: u64, d: u64, e: u64, f: u64)

use syscall_defs::*;
let res = match num as usize {
SYS_READ => sys::sys_read(a, b, c),
SYS_WRITE => sys::sys_write(a, b, c),
SYS_READ => sys::sys_read(a, b, c).maybe_into_erestartsys(),
SYS_WRITE => sys::sys_write(a, b, c).maybe_into_erestartsys(),
SYS_OPEN => sys::sys_open(a, b, c, d),
SYS_CLOSE => sys::sys_close(a),
SYS_CHDIR => sys::sys_chdir(a, b),
Expand Down Expand Up @@ -95,4 +95,4 @@ pub fn syscall_handler(num: u64, a: u64, b: u64, c: u64, d: u64, e: u64, f: u64)
};

res
}
}

0 comments on commit 40955fe

Please sign in to comment.