mirror of
https://github.com/asterinas/asterinas.git
synced 2025-06-24 09:53:24 +00:00
Allow passing the process Context
to syscall handlers
This commit is contained in:
committed by
Tate, Hongliang Tian
parent
19ad2a2eb4
commit
66a37da214
@ -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);
|
||||
|
||||
|
Reference in New Issue
Block a user