xoreos  0.0.5
Public Member Functions | Private Attributes | List of all members
Common::Semaphore Class Reference

A semaphore . More...

#include <mutex.h>

Inheritance diagram for Common::Semaphore:
Inheritance graph
[legend]
Collaboration diagram for Common::Semaphore:
Collaboration graph
[legend]

Public Member Functions

 Semaphore (uint value=0)
 
 ~Semaphore ()
 
bool lock (uint32 timeout=0)
 
bool lockTry ()
 
void unlock ()
 
uint32 getValue ()
 

Private Attributes

SDL_sem * _semaphore
 

Detailed Description

A semaphore .

Definition at line 55 of file mutex.h.

Constructor & Destructor Documentation

◆ Semaphore()

Common::Semaphore::Semaphore ( uint  value = 0)

Definition at line 52 of file mutex.cpp.

References _semaphore.

◆ ~Semaphore()

Common::Semaphore::~Semaphore ( )

Definition at line 56 of file mutex.cpp.

References _semaphore.

Member Function Documentation

◆ getValue()

uint32 Common::Semaphore::getValue ( )

Definition at line 79 of file mutex.cpp.

References _semaphore.

◆ lock()

bool Common::Semaphore::lock ( uint32  timeout = 0)

◆ lockTry()

bool Common::Semaphore::lockTry ( )

Definition at line 71 of file mutex.cpp.

References _semaphore.

Referenced by Graphics::Aurora::AnimationThread::threadMethod().

Here is the caller graph for this function:

◆ unlock()

void Common::Semaphore::unlock ( )

Member Data Documentation

◆ _semaphore

SDL_sem* Common::Semaphore::_semaphore
private

Definition at line 67 of file mutex.h.

Referenced by getValue(), lock(), lockTry(), Semaphore(), unlock(), and ~Semaphore().


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