Minetest 5.9.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(), AsyncEngine::queueAsyncJob(), UpdateThread::stop(), TestThreading::testAtomicSemaphoreThread(), and con::ConnectionSendThread::Trigger().

+ Here is the caller graph for this function:

◆ wait() [1/2]

void Semaphore::wait ( )

References semaphore, and UNUSED.

Referenced by AsyncEngine::getJob(), MutexedQueue< T >::pop_back(), MutexedQueue< T >::pop_backNoEx(), MutexedQueue< T >::pop_front(), MutexedQueue< T >::pop_frontNoEx(), con::ConnectionSendThread::run(), AtomicTestThread::run(), and UpdateThread::run().

+ Here is the caller graph for this function:

◆ 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(), and wait().


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