qthread_syncvar_readFF - Man Page
waits for the syncvar to be full, then copies its data
Synopsis
#include <qthread.h>
int
qthread_syncvar_readFF (uint64_t * restrict dest, syncvar_t * restrict 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 dest may be NULL, in which case the data will not be copied.
The semantics of readFF are:
1 - src's FEB state must be "full"
2 - data is copied from src to dest
Return Value
On success, the memory address src is marked full, the address dest is filled with the contents of src and 0 (QTHREAD_SUCCESS) is returned. On error, an non-zero error code is returned.
Errors
- ENOMEM
Not enough memory could be allocated for bookkeeping structures. QTHREAD_TIMEOUT Could not obtain the lock on the syncvar_t's status bits. This may be caused by many things, including memory corruption, invalid syncvar, or even absurdly excessive contention (because its protected by a naive spinlock rather than a fair spinlock).
See Also
qthread_syncvar_empty(3), qthread_syncvar_fill(3), qthread_syncvar_writeFE(3), qthread_syncvar_writeF(3), qthread_syncvar_readFE(3), qthread_syncvar_status(3)
Referenced By
qthread_syncvar_empty(3), qthread_syncvar_readFE(3), qthread_syncvar_status(3), qthread_syncvar_writeEF(3), qthread_syncvar_writeF(3).