Process queue functions manipulate the O/S process queues, which are used for everything from scheduling and timers to synchronization and interprocess communication.
More...
Detailed Description
Process queue functions manipulate the O/S process queues, which are used for everything from scheduling and timers to synchronization and interprocess communication.
A process ID can be in at most one queue.
Function Documentation
Remove and return the first process on a list.
- Parameters:
-
q | queue from which process should be removed |
- Returns:
- process id of removed process, or EMPTY
short enqueue |
( |
short |
pid, |
|
|
queue |
q |
|
) |
| |
Insert a process at the tail of a queue.
- Parameters:
-
pid | process ID to enqueue |
q | queue to which the process should be added |
- Returns:
- process id of enqueued process
Initialize a new queue in the global process queue table.
- Returns:
- newly allocated
short prioritize |
( |
short |
pid, |
|
|
queue |
q, |
|
|
ulong |
key |
|
) |
| |
Prioritize a process into a queue in descending key order.
- Parameters:
-
pid | process id to prioritize |
q | queue in which process should be prioritizeed |
key | sorting key (priority, for example) |
- Returns:
- OK
short remove |
( |
short |
pid | ) |
|
Remove a process from anywhere in a queue.
- Parameters:
-
- Returns:
- process id of removed process