Luanti 5.10.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.

◆ ~Semaphore()

Semaphore::~Semaphore ( )

References semaphore, and UNUSED.

Member Function Documentation

◆ DISABLE_CLASS_COPY()

Semaphore::DISABLE_CLASS_COPY ( Semaphore )

◆ post()

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

References semaphore, and UNUSED.

Referenced by AsyncEngine::~AsyncEngine(), UpdateThread::deferUpdate(), MutexedQueue< T >::push_back(), MutexedQueue< T >::push_back(), AsyncEngine::queueAsyncJob(), AsyncEngine::queueAsyncJob(), UpdateThread::stop(), TestThreading::testAtomicSemaphoreThread(), and con::ConnectionSendThread::Trigger().

+ Here is the caller graph for this function:

◆ wait() [1/2]

void Semaphore::wait ( )

◆ wait() [2/2]

bool Semaphore::wait ( unsigned int time_ms)

References semaphore.

Member Data Documentation

◆ semaphore

sem_t Semaphore::semaphore
private

Referenced by Semaphore(), ~Semaphore(), post(), wait(), and wait().


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