gtkIOStream  1.7.0
GTK+ << C++ IOStream operators for GTK+. Now with ORBing, numerical computation, audio client and more ...
Futex Class Reference

#include <Futex.H>

Public Member Functions

 Futex ()
 
int wait ()
 
int waitVal (int val)
 
int wake (int howMany)
 
int wakeAll ()
 

Private Attributes

int f
 The futex variable. More...
 

Detailed Description

Class to implement Futex signalling.

Definition at line 29 of file Futex.H.

Constructor & Destructor Documentation

◆ Futex()

Futex::Futex ( )
inline

Definition at line 33 of file Futex.H.

Member Function Documentation

◆ wait()

int Futex::wait ( )
inline

Wait on the wake signal (using the DEFAULT_START_VAL)

Returns
0 on success, or <0 on failure

Definition at line 40 of file Futex.H.

Here is the call graph for this function:

◆ waitVal()

int Futex::waitVal ( int  val)
inline

Wait on the wake signal or if val hasn't changed.

Parameters
valThe waiting value for f : if still this value, then wait
Returns
0 on success, or <0 on failure

Definition at line 48 of file Futex.H.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ wake()

int Futex::wake ( int  howMany)
inline

Wakes up threads in the wait method.

Parameters
howManyINT_MAX for all, otherwise <INT_MAX for that many.
Returns
the number of waiters woken up or <0 on error

Definition at line 61 of file Futex.H.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ wakeAll()

int Futex::wakeAll ( )
inline

Wake all waiting threads.

Returns
the number of waiters woken up or <0 on error

Definition at line 72 of file Futex.H.

Here is the call graph for this function:

Member Data Documentation

◆ f

int Futex::f
private

The futex variable.

Definition at line 31 of file Futex.H.


The documentation for this class was generated from the following file:
gtkIOStream: Futex Class Reference
GTK+ IOStream  Beta