Question: In sysproc.c , define a function in which cps and chpr functions will be called. //Add this in the end of the sysproc.c file int
- In sysproc.c, define a function in which cps and chpr functions will be called.
//Add this in the end of the sysproc.c file
| int |
|
|
| sys_cps(void) |
|
| { |
|
| return cps(); |
|
| } |
|
|
|
|
| int |
|
| sys_chpr(void) |
|
| { |
|
| int pid, pr; |
|
| if(argint(0, &pid) < 0) |
|
| return -1; |
|
| if(argint(1, &pr) < 0) |
|
| return -1; |
|
|
|
|
| return chpr(pid, pr); |
|
| }
|
- Make minor changes in the usys.S file. The .S extension indicates that this file has assembly level code and this file interacts with the hardware of the system.
//Add this in the end of the usys.S file
SYSCALL(cps)
SYSCALL(chpr)
Can someone help to solve it using ubuntu, please? My laptop is broken, please help me?
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
