libguac 1.6.0
 
Loading...
Searching...
No Matches
guac_flag Struct Reference

Generic integer flag intended for signalling of arbitrary events between processes. More...

Data Fields

pthread_mutex_t value_mutex
 The mutex used to ensure concurrent changes to the value of this flag are threadsafe, as well as to satisfy the requirements of the pthread conditional used to signal changes to the value of this flag.
 
pthread_cond_t value_changed
 Condition variable that signals when the value of this flag has changed.
 
unsigned int value
 The current value of this flag.
 

Detailed Description

Generic integer flag intended for signalling of arbitrary events between processes.

This flag may be safely included in shared memory, but must be initialized with guac_flag_init().

In addition to basic signalling and tracking of flag values, it is intended that the locking/unlocking facilities of guac_flag may be used in lieu of a mutex to guard concurrent access to any number of shared resources related to the flag.

Field Documentation

◆ value

unsigned int guac_flag::value

The current value of this flag.

This value may be the bitwise OR'd value of any number of arbitrary flags, so long as those flags fit within an int. It is entirely up to the user of this guac_flag to define the meaning of any value(s) assigned.


The documentation for this struct was generated from the following file: