#include <proc.h>#include <queue.h>

Go to the source code of this file.
Functions | |
| short | enqueue (short pid, queue q) |
| short | remove (short pid) |
| short | dequeue (queue q) |
| queue | newqueue (void) |
Variables | |
| struct qentry | queuetab [NQENT] |
| static int | nextqueue = NPROC |
Definition in file queue.c.
| short dequeue | ( | queue | q | ) |
Remove and return the first process on a list
| q | queue from which process should be removed |
Definition at line 57 of file queue.c.
References EMPTY, isbadqueue, qentry::next, NPROC, qentry::prev, queuehead, queuetab, and SYSERR.
Referenced by freesem(), resched(), signal(), signaln(), test_deltaQueue(), test_procQueue(), and wakeup().
| short enqueue | ( | short | pid, | |
| queue | q | |||
| ) |
Insert a process at the tail of a queue
| pid | process ID to enqueue | |
| q | queue to which the process should be added |
Definition at line 21 of file queue.c.
References isbadpid, isbadqueue, qentry::next, qentry::prev, queuetab, queuetail, and SYSERR.
Referenced by wait().
| queue newqueue | ( | void | ) |
Initialize a new queue in the global process queue table
Definition at line 79 of file queue.c.
References EMPTY, qentry::next, nextqueue, qentry::prev, and queuetab.
Referenced by sysinit().
| short remove | ( | short | pid | ) |
Remove a process from anywhere in a queue
| pid | process ID to remove |
Definition at line 43 of file queue.c.
References isbadpid, qentry::next, qentry::prev, queuetab, and SYSERR.
int nextqueue = NPROC [static] |
1.5.5