NAME
src/tsq.c - Thread-safe queues
DESCRIPTION
This file implements thread-safe queues for Parrot.
Functions
QUEUE_ENTRY *pop_entry
Does a synchronized removal of the head entry off the queue and returns it.
QUEUE_ENTRY *peek_entry
This does no locking,
so the result might have changed by the time you get the entry,
but a synchronized QUEUE_ENTRY *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.
QUEUE_ENTRY *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.
void push_entry
Does a synchronized insertion of void unshift_entry
Does a synchronized insertion of void nosync_insert_entry
Inserts a timed event according to void insert_entry
Does a synchronized insert of void queue_lock
Locks the queue's mutex.
void queue_unlock
Unlocks the queue's mutex.
void queue_broadcast
This function wakes up every thread waiting on the queue.
void queue_signal
RT#48260: Document this!
void queue_wait
Instructs the queue to wait.
void queue_timedwait
Instructs the queue to wait for QUEUE *queue_init
Initializes the queue,
setting void queue_destroy
Destroys the queue,
raising an exception if it is not empty.
pop_entry()
will check again and return NULL
if the queue is empty.
entry
onto the tail of the queue.
entry
into the head of the queue.
abstime
.
The caller has to hold the queue mutex.
entry
.
abs_time
seconds (?).
prio
as the queue's priority.
SEE ALSO
include/parrot/tsq.h.