src/tsq.c - Thread-safe queues
pop_entry
- Does a synchronized removal of the head entry off the queue and returns it.
peek_entry
- This does no locking,
so the result might have changed by the time you get the entry,
but a synchronized
pop_entry()
will check again and return NULL
if the queue is empty.
nosync_pop_entry
- Grab an entry off the queue with no synchronization.
Internal only,
because it's darned evil and shouldn't be used outside the module.
It's in here so we don't have to duplicate pop code.
wait_for_entry
- Does a synchronized removal of the head entry off the queue,
waiting if necessary until there is an entry,
and then returns it.
push_entry
- Does a synchronized insertion of
entry
onto the tail of the queue.
unshift_entry
- Does a synchronized insertion of
entry
into the head of the queue.
nosync_insert_entry
- Inserts a timed event according to
abstime
.
The caller has to hold the queue mutex.
insert_entry
- Does a synchronized insert of
entry
.
queue_lock
- Locks the queue's mutex.
queue_unlock
- Unlocks the queue's mutex.
queue_broadcast
- This function wakes up every thread waiting on the queue.
queue_signal
- XXX Needs a description
queue_wait
- Instructs the queue to wait.
queue_timedwait
- Instructs the queue to wait for
abs_time
seconds (?).
queue_init
- Initializes the queue,
setting
prio
as the queue's priority.
queue_destroy
- Destroys the queue,
raising an exception if it is not empty.
include/parrot/tsq.h.