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
, niced
;
14 if (!isokendpt(m_ptr
->m_lsys_krn_schedule
.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
= m_ptr
->m_lsys_krn_schedule
.priority
;
25 quantum
= m_ptr
->m_lsys_krn_schedule
.quantum
;
26 cpu
= m_ptr
->m_lsys_krn_schedule
.cpu
;
27 niced
= !!(m_ptr
->m_lsys_krn_schedule
.niced
);
29 return sched_proc(p
, priority
, quantum
, cpu
, niced
);