1 #include "kernel/system.h"
2 #include <minix/endpoint.h>
3 #include "kernel/clock.h"
5 /*===========================================================================*
7 *===========================================================================*/
8 int do_schedule(struct proc
* caller
, message
* m_ptr
)
12 int priority
, quantum
, cpu
;
14 if (!isokendpt(m_ptr
->SCHEDULING_ENDPOINT
, &proc_nr
))
17 p
= proc_addr(proc_nr
);
19 /* Only this process' scheduler can schedule it */
20 if (caller
!= p
->p_scheduler
)
23 /* Try to schedule the process. */
24 priority
= (int) m_ptr
->SCHEDULING_PRIORITY
;
25 quantum
= (int) m_ptr
->SCHEDULING_QUANTUM
;
26 cpu
= (int) m_ptr
->SCHEDULING_CPU
;
28 return sched_proc(p
, priority
, quantum
, cpu
);