SMP - Changed prototype of sys_schedule()
- sys_schedule can change only selected values, -1 means that the current value should be kept unchanged. For instance we mostly want to change the scheduling quantum and priority but we want to keep the process at the current cpu - RS can hand off its processes to scheduler - service can read the destination cpu from system.conf - RS can pass the information farther
This commit is contained in:
@@ -46,9 +46,13 @@ PUBLIC int sched_inherit(endpoint_t scheduler_e,
|
||||
/*===========================================================================*
|
||||
* sched_start *
|
||||
*===========================================================================*/
|
||||
PUBLIC int sched_start(endpoint_t scheduler_e, endpoint_t schedulee_e,
|
||||
endpoint_t parent_e, unsigned maxprio, unsigned quantum,
|
||||
endpoint_t *newscheduler_e)
|
||||
PUBLIC int sched_start(endpoint_t scheduler_e,
|
||||
endpoint_t schedulee_e,
|
||||
endpoint_t parent_e,
|
||||
int maxprio,
|
||||
int quantum,
|
||||
int cpu,
|
||||
endpoint_t *newscheduler_e)
|
||||
{
|
||||
int rv;
|
||||
message m;
|
||||
@@ -68,7 +72,7 @@ PUBLIC int sched_start(endpoint_t scheduler_e, endpoint_t schedulee_e,
|
||||
/* The KERNEL must schedule this process. */
|
||||
if(scheduler_e == KERNEL) {
|
||||
if ((rv = sys_schedctl(SCHEDCTL_FLAG_KERNEL,
|
||||
schedulee_e, maxprio, quantum)) != OK) {
|
||||
schedulee_e, maxprio, quantum, cpu)) != OK) {
|
||||
return rv;
|
||||
}
|
||||
*newscheduler_e = scheduler_e;
|
||||
|
||||
@@ -1,7 +1,10 @@
|
||||
#include "syslib.h"
|
||||
|
||||
PUBLIC int sys_schedctl(unsigned flags, endpoint_t proc_ep, unsigned priority,
|
||||
unsigned quantum)
|
||||
PUBLIC int sys_schedctl(unsigned flags,
|
||||
endpoint_t proc_ep,
|
||||
int priority,
|
||||
int quantum,
|
||||
int cpu)
|
||||
{
|
||||
message m;
|
||||
|
||||
@@ -9,5 +12,6 @@ PUBLIC int sys_schedctl(unsigned flags, endpoint_t proc_ep, unsigned priority,
|
||||
m.SCHEDCTL_ENDPOINT = proc_ep;
|
||||
m.SCHEDCTL_PRIORITY = priority;
|
||||
m.SCHEDCTL_QUANTUM = quantum;
|
||||
m.SCHEDCTL_CPU = cpu;
|
||||
return(_kernel_call(SYS_SCHEDCTL, &m));
|
||||
}
|
||||
|
||||
@@ -1,11 +1,15 @@
|
||||
#include "syslib.h"
|
||||
|
||||
PUBLIC int sys_schedule(endpoint_t proc_ep, unsigned priority, unsigned quantum)
|
||||
PUBLIC int sys_schedule(endpoint_t proc_ep,
|
||||
int priority,
|
||||
int quantum,
|
||||
int cpu)
|
||||
{
|
||||
message m;
|
||||
|
||||
m.SCHEDULING_ENDPOINT = proc_ep;
|
||||
m.SCHEDULING_PRIORITY = priority;
|
||||
m.SCHEDULING_QUANTUM = quantum;
|
||||
m.SCHEDULING_CPU = cpu;
|
||||
return(_kernel_call(SYS_SCHEDULE, &m));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user