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:
@@ -8,7 +8,7 @@ PUBLIC int do_schedctl(struct proc * caller, message * m_ptr)
|
||||
{
|
||||
struct proc *p;
|
||||
unsigned flags;
|
||||
unsigned priority, quantum;
|
||||
int priority, quantum, cpu;
|
||||
int proc_nr;
|
||||
int r;
|
||||
|
||||
@@ -29,11 +29,12 @@ PUBLIC int do_schedctl(struct proc * caller, message * m_ptr)
|
||||
/* the kernel becomes the scheduler and starts
|
||||
* scheduling the process.
|
||||
*/
|
||||
priority = (unsigned) m_ptr->SCHEDCTL_PRIORITY;
|
||||
quantum = (unsigned) m_ptr->SCHEDCTL_QUANTUM;
|
||||
priority = (int) m_ptr->SCHEDCTL_PRIORITY;
|
||||
quantum = (int) m_ptr->SCHEDCTL_QUANTUM;
|
||||
cpu = (int) m_ptr->SCHEDCTL_CPU;
|
||||
|
||||
/* Try to schedule the process. */
|
||||
if((r = sched_proc(p, priority, quantum) != OK))
|
||||
if((r = sched_proc(p, priority, quantum, cpu) != OK))
|
||||
return r;
|
||||
p->p_scheduler = NULL;
|
||||
} else {
|
||||
|
||||
@@ -9,7 +9,7 @@ PUBLIC int do_schedule(struct proc * caller, message * m_ptr)
|
||||
{
|
||||
struct proc *p;
|
||||
int proc_nr;
|
||||
unsigned priority, quantum;
|
||||
int priority, quantum, cpu;
|
||||
|
||||
if (!isokendpt(m_ptr->SCHEDULING_ENDPOINT, &proc_nr))
|
||||
return EINVAL;
|
||||
@@ -21,7 +21,9 @@ PUBLIC int do_schedule(struct proc * caller, message * m_ptr)
|
||||
return(EPERM);
|
||||
|
||||
/* Try to schedule the process. */
|
||||
priority = (unsigned) m_ptr->SCHEDULING_PRIORITY;
|
||||
quantum = (unsigned) m_ptr->SCHEDULING_QUANTUM;
|
||||
return sched_proc(p, priority, quantum);
|
||||
priority = (int) m_ptr->SCHEDULING_PRIORITY;
|
||||
quantum = (int) m_ptr->SCHEDULING_QUANTUM;
|
||||
cpu = (int) m_ptr->SCHEDULING_CPU;
|
||||
|
||||
return sched_proc(p, priority, quantum, cpu);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user