Table of Contents

Name

qthread_syncvar_empty, qthread_syncvar_fill - sets the given syncvar to either "empty" or "full"

Synopsis

#include <qthread.h>

int
qthread_syncvar_empty (syncvar_t *dest);

int
qthread_syncvar_fill (syncvar_t *dest);

Description

The qthread_syncvar_empty() and qthread_syncvar_fill() functions assert the empty or full state of the given dest addresses. They do not wait for the addresses to be in any particular state.

Return Value

On success, the full/empty bits are modified and 0 is returned. On error, an non-zero error code is returned.

Errors

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_writeF(3) , qthread_syncvar_writeEF(3) , qthread_syncvar_readFF(3) , qthread_syncvar_readFE(3)


Table of Contents