Table of Contents


qthread_readFF - waits for the source to be full, then copies it


#include <qthread.h>

qthread_readFF (aligned_t *dest, const aligned_t *src);


This function waits for memory to become full, and then reads it and leaves the memory as full. When memory becomes full, all threads waiting for it to become full with a readFF will receive the value at once and will be queued to run. Data is read from src and stored in dest.

The semantics of readFF are:

1 - src’s FEB state must be "full"
2 - data is copied from src to dest


This, and all other FEB-related functions currently operate exclusively on aligned data. This is to simulate the behavior of the MTA as closely as possible. The library requires 4- or 8-byte alignment, depending on whether compiled in 32-bit or 64-bit mode.

Return Value

On success, the memory address src is marked full, the address dest is filled with the contents of src and 0 is returned. On error, an non-zero error code is returned.


Not enough memory could be allocated for bookkeeping structures.

See Also

qthread_empty(3) , qthread_fill(3) , qthread_writeEF(3) , qthread_writeF(3) , qthread_readFE(3) , qthread_lock(3) , qthread_unlock(3)

Table of Contents