ObjFW
Loading...
Searching...
No Matches
Functions
OFPlainCondition.h File Reference
#include "objfw-defs.h"
#include "platform.h"
import "OFObject.h"
import "OFPlainMutex.h"

Go to the source code of this file.

Functions

int OFPlainConditionNew (OFPlainCondition *condition)
 Creates a new plain condition.
 
int OFPlainConditionSignal (OFPlainCondition *condition)
 Signals the specified condition.
 
int OFPlainConditionBroadcast (OFPlainCondition *condition)
 Broadcasts the specified condition, meaning it will be signaled to everyone waiting.
 
int OFPlainConditionWait (OFPlainCondition *condition, OFPlainMutex *mutex)
 Waits on the specified condition with the specified mutex.
 
int OFPlainConditionTimedWait (OFPlainCondition *condition, OFPlainMutex *mutex, OFTimeInterval timeout)
 Waits on the specified condition with the specified mutex with a timeout.
 
int OFPlainConditionWaitOrExecSignal (OFPlainCondition *condition, OFPlainMutex *mutex, ULONG *signalMask)
 Waits on the specified condition with the specified mutex or the specified Exec signal.
 
int OFPlainConditionTimedWaitOrExecSignal (OFPlainCondition *condition, OFPlainMutex *mutex, OFTimeInterval timeout, ULONG *signalMask)
 Waits on the specified condition with the specified mutex or the specified Exec signal, up until the timeout is reached.
 
int OFPlainConditionFree (OFPlainCondition *condition)
 Destroys the specified plain condition.
 

Function Documentation

◆ OFPlainConditionBroadcast()

int OFPlainConditionBroadcast ( OFPlainCondition * condition)
extern

Broadcasts the specified condition, meaning it will be signaled to everyone waiting.

Parameters
conditionA pointer to the condition to broadcast
Returns
0 on success, or an error number from <errno.h> on error

◆ OFPlainConditionFree()

int OFPlainConditionFree ( OFPlainCondition * condition)
extern

Destroys the specified plain condition.

Parameters
conditionA pointer to the condition to destroy
Returns
0 on success, or an error number from <errno.h> on error

◆ OFPlainConditionNew()

int OFPlainConditionNew ( OFPlainCondition * condition)
extern

Creates a new plain condition.

A plain condition is similar to an OFCondition, but does not use exceptions and can be used from pure C code.

Parameters
conditionA pointer to the condition to create
Returns
0 on success, or an error number from <errno.h> on error

◆ OFPlainConditionSignal()

int OFPlainConditionSignal ( OFPlainCondition * condition)
extern

Signals the specified condition.

Parameters
conditionA pointer to the condition to signal
Returns
0 on success, or an error number from <errno.h> on error

◆ OFPlainConditionTimedWait()

int OFPlainConditionTimedWait ( OFPlainCondition * condition,
OFPlainMutex * mutex,
OFTimeInterval timeout )
extern

Waits on the specified condition with the specified mutex with a timeout.

Parameters
conditionA pointer to the condition to wait on
mutexThe mutex to wait with
timeoutThe timeout after which to give up
Returns
0 on success, or an error number from <errno.h> on error

◆ OFPlainConditionTimedWaitOrExecSignal()

int OFPlainConditionTimedWaitOrExecSignal ( OFPlainCondition * condition,
OFPlainMutex * mutex,
OFTimeInterval timeout,
ULONG * signalMask )
extern

Waits on the specified condition with the specified mutex or the specified Exec signal, up until the timeout is reached.

Parameters
conditionA pointer to the condition to wait on
mutexThe mutex to wait with
signalMaskThe Exec signal mask to wait for
timeoutThe timeout after which to give up
Returns
0 on success, or an error number from <errno.h> on error

◆ OFPlainConditionWait()

int OFPlainConditionWait ( OFPlainCondition * condition,
OFPlainMutex * mutex )
extern

Waits on the specified condition with the specified mutex.

Parameters
conditionA pointer to the condition to wait on
mutexThe mutex to wait with
Returns
0 on success, or an error number from <errno.h> on error

◆ OFPlainConditionWaitOrExecSignal()

int OFPlainConditionWaitOrExecSignal ( OFPlainCondition * condition,
OFPlainMutex * mutex,
ULONG * signalMask )
extern

Waits on the specified condition with the specified mutex or the specified Exec signal.

Parameters
conditionA pointer to the condition to wait on
mutexThe mutex to wait with
signalMaskThe Exec signal mask to wait for
Returns
0 on success, or an error number from <errno.h> on error