Luanti 5.16.0-dev
Loading...
Searching...
No Matches
Semaphore Class Reference

#include <semaphore.h>

Public Member Functions

 Semaphore (int val=0)
 ~Semaphore ()
 DISABLE_CLASS_COPY (Semaphore)
void post (unsigned int num=1)
void wait ()
bool wait (unsigned int time_ms)

Private Attributes

sem_t semaphore

Constructor & Destructor Documentation

◆ Semaphore()

Semaphore::Semaphore ( int val = 0)

References semaphore, and UNUSED.

Referenced by DISABLE_CLASS_COPY().

Here is the caller graph for this function:

◆ ~Semaphore()

Semaphore::~Semaphore ( )

References semaphore, and UNUSED.

Member Function Documentation

◆ DISABLE_CLASS_COPY()

Semaphore::DISABLE_CLASS_COPY ( Semaphore )

References Semaphore(), and semaphore.

Here is the call graph for this function:

◆ post()

void Semaphore::post ( unsigned int num = 1)

References semaphore, and UNUSED.

Referenced by TestThreading::testAtomicSemaphoreThread().

Here is the caller graph for this function:

◆ wait() [1/2]

void Semaphore::wait ( )

References semaphore, and UNUSED.

◆ wait() [2/2]

bool Semaphore::wait ( unsigned int time_ms)

References semaphore.

Member Data Documentation

◆ semaphore

sem_t Semaphore::semaphore
private

The documentation for this class was generated from the following files: