qthread_readFF - Man Page
waits for the source to be full, then copies it
Synopsis
#include <qthread.h>
int
qthread_readFF (aligned_t *dest, const aligned_t *src);
Description
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
Warning
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.
Errors
- ENOMEM
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)
Referenced By
qthread_empty(3), qthread_feb_status(3), qthread_lock(3), qthread_readFE(3), qthread_writeEF(3), qthread_writeF(3).