sched(rp, &q, &front);
vmassert(q >= 0);
- vmassert(q < IDLE_Q || rp->p_endpoint == IDLE);
/* Now add the process to the queue. */
if (rdy_head[q] == NIL_PROC) { /* add to empty queue */
vmassert(rp->p_ticks_left);
vmassert(q >= 0);
- vmassert(q < IDLE_Q || rp->p_endpoint == IDLE);
q = rp->p_priority;
*/
if (! time_left) { /* quantum consumed ? */
rp->p_ticks_left = rp->p_quantum_size; /* give new quantum */
- if (rp->p_priority < (IDLE_Q-1)) {
+ if (rp->p_priority < (NR_SCHED_QUEUES-1)) {
rp->p_priority += 1; /* lower priority */
}
}
#define NR_SCHED_QUEUES 16 /* MUST equal minimum priority + 1 */
#define TASK_Q 0 /* highest, used for kernel tasks */
#define MAX_USER_Q 0 /* highest priority for user processes */
-#define USER_Q 7 /* default (should correspond to nice 0) */
-#define MIN_USER_Q 14 /* minimum priority for user processes */
-#define IDLE_Q 15 /* lowest, only IDLE process goes here */
+#define USER_Q (NR_SCHED_QUEUES / 2) /* default (should correspond to
+ nice 0) */
+#define MIN_USER_Q (NR_SCHED_QUEUES - 1) /* minimum priority for user
+ processes */
/* Magic process table addresses. */
#define BEG_PROC_ADDR (&proc[0])
PUBLIC struct boot_image image[] = {
/* process nr, pc,flags, qs, queue, stack, traps, ipcto, call, name */
-{IDLE, NULL,IDL_F, 0, IDLE_Q, IDL_S, 0, 0, no_c,"idle" },
+{IDLE, NULL,IDL_F, 0, 0, IDL_S, 0, 0, no_c,"idle" },
{CLOCK,clock_task,TSK_F, 8, TASK_Q, TSK_S, TSK_T, 0, no_c,"clock" },
{SYSTEM, sys_task,TSK_F, 8, TASK_Q, TSK_S, TSK_T, 0, no_c,"system"},
{HARDWARE, 0,TSK_F, 8, TASK_Q, HRD_S, 0, 0, no_c,"kernel"},