Skip to content
Snippets Groups Projects
Commit 6c383c83 authored by Fache Charles's avatar Fache Charles
Browse files

3.2: wrote sys_nice, passes tests but incoherence exists between tests and wording

parent 2dadbcdc
No related branches found
Tags tp1-act-3-2
No related merge requests found
......@@ -75,7 +75,15 @@ sys_sleep(void)
uint64
sys_nice(void){
return 0;
int pid, priority;
if(argint(0, &pid) < 0 ||
argint(1, &priority) < 0 ||
priority < 0 ||
priority >= NPRIO)
return -1; // if an argument is obviously wrong, return -1
return nice(pid, priority);
}
uint64
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment