Allow passing the process Context to syscall handlers

This commit is contained in:
Zhang Junyang
2024-08-04 06:37:50 +00:00
committed by Tate, Hongliang Tian
parent 19ad2a2eb4
commit 66a37da214
137 changed files with 870 additions and 491 deletions

View File

@ -9,7 +9,7 @@ use crate::{
sched::nice::Nice,
};
pub fn sys_set_priority(which: i32, who: u32, prio: i32) -> Result<SyscallReturn> {
pub fn sys_set_priority(which: i32, who: u32, prio: i32, _ctx: &Context) -> Result<SyscallReturn> {
let prio_target = PriorityTarget::new(which, who)?;
let new_nice = {
let norm_prio = prio.clamp(i8::MIN as i32, i8::MAX as i32) as i8;
@ -29,7 +29,7 @@ pub fn sys_set_priority(which: i32, who: u32, prio: i32) -> Result<SyscallReturn
Ok(SyscallReturn::Return(0))
}
pub fn sys_get_priority(which: i32, who: u32) -> Result<SyscallReturn> {
pub fn sys_get_priority(which: i32, who: u32, _ctx: &Context) -> Result<SyscallReturn> {
let prio_target = PriorityTarget::new(which, who)?;
debug!("get_priority prio_target: {:?}", prio_target);