Go to the source code of this file.
Define Documentation
Function Documentation
Get a task from the queue.
- Parameters:
-
q | The queue. |
rid | runner ID for ownership issues. |
keep | If true, remove the returned index from the queue. |
- Returns:
- A task (pair or tuple) with no unresolved conflicts or
NULL
if none could be found.
Add an index to the given queue.
- Parameters:
-
q | The queue. |
thing | The thing to be inserted. |
Inserts a task into the queue at the location of the next pointer and moves all remaining tasks up by one. Thus, if the queue is executing, the inserted task is considered to already have been taken.
- Returns:
- 1 on success, 0 if the queue is full and <0 on error (see queue_err).
Initialize a task queue with pairs.
- Parameters:
-
q | The queue to initialize. |
size | The maximum number of cellpairs in this queue. |
s | The space with which this queue is associated. |
pairs | An array containing the pairs to which the queue indices will refer to. |
- Returns:
- queue_err_ok or <0 on error (see queue_err).
Initializes a queue of the maximum given size. The initial queue is empty and can be filled with pair ids.
- See also:
- queue_tuples_init
Reset the queue.
- Parameters:
-
Initialize a task queue with tuples.
- Parameters:
-
q | The queue to initialize. |
size | The maximum number of cellpairs in this queue. |
s | The space with which this queue is associated. |
tuples | An array containing the tuples to which the queue indices will refer to. |
- Returns:
- queue_err_ok or <0 on error (see queue_err).
Initializes a queue of the maximum given size. The initial queue is empty and can be filled with tuple ids.
- See also:
- queue_tuples_init
Variable Documentation
ID of the last error
The ID of the last error.