Name
Process Queues -- Process Queue Handling.
Description
This are the functions to use when working with any queue of processes in the
CPU.
Details
DECLARE_PROC_QUEUE()
#define DECLARE_PROC_QUEUE(queue) |
Declares a new and empty process queue with name queue.
proc_queue_empty()
#define proc_queue_empty(queue) |
Is queue empty?
proc_data()
#define proc_data(element) |
Retrives the process data from the queue element.
proc_queue_next()
#define proc_queue_next(element) |
Gets the next element on the queue starting at element.
proc_queue_find()
#define proc_queue_find(queue, proc) |
Find the queue element for process proc.
proc_queue_len()
#define proc_queue_len(queue) |
Calculate the number of elements on queue.
proc_queue_init()
#define proc_queue_init(queue) |
Initializes process queue queue.
Note: applyed to a non empty queue will loose all its elements.
proc_queue_foreach()
#define proc_queue_foreach(queue, func, data) |
Will call func for every process on queue using the process pointer
as the first arguemt and data as the second.
proc_queue_concat()
#define proc_queue_concat(dest, orig1, orig2) |
Concatenates orig1 and orig2 into dest.
proc_queue_remove()
#define proc_queue_remove(queue, proc) |
Remove proc from queue.
proc_queue_append()
#define proc_queue_append(queue, proc) |
Append proc to queue.
proc_queue_nth()
#define proc_queue_nth(queue, n) |
Get element number n from queue.
proc_queue_end()
#define proc_queue_end(element) proc_queue_empty(element) |
Is this element the end of the queue?