Public Member Functions | Private Attributes | List of all members
icl_core::thread::Semaphore Class Reference

#include <Sem.h>

Inheritance diagram for icl_core::thread::Semaphore:
Inheritance graph
[legend]

Public Member Functions

void post ()
 
 Semaphore (size_t initial_value)
 
bool tryWait ()
 
bool wait ()
 
bool wait (const icl_core::TimeSpan &timeout)
 
bool wait (const icl_core::TimeStamp &timeout)
 
virtual ~Semaphore ()
 

Private Attributes

SemaphoreImplm_impl
 

Additional Inherited Members

- Protected Member Functions inherited from icl_core::Noncopyable
 Noncopyable ()
 
virtual ~Noncopyable ()
 

Detailed Description

Implements a platform independent mutex.

Definition at line 48 of file Sem.h.

Constructor & Destructor Documentation

icl_core::thread::Semaphore::Semaphore ( size_t  initial_value)

Definition at line 43 of file Sem.cpp.

icl_core::thread::Semaphore::~Semaphore ( )
virtual

Definition at line 74 of file Sem.cpp.

Member Function Documentation

void icl_core::thread::Semaphore::post ( )

Increments the semaphore.

Definition at line 80 of file Sem.cpp.

bool icl_core::thread::Semaphore::tryWait ( )

Tries to decrement the semaphore. Does not block if the semaphore is unavailable.

Returns
true if the semaphore has been decremented, false otherwise.

Definition at line 85 of file Sem.cpp.

bool icl_core::thread::Semaphore::wait ( )

Decrements the semaphore. If the semaphore is unavailable this function blocks.

Returns
true if the semaphore has been decremented, false otherwise.

Definition at line 90 of file Sem.cpp.

bool icl_core::thread::Semaphore::wait ( const icl_core::TimeSpan timeout)

Decrements the semaphore. If the semaphore is unavailable this function blocks until the relative timeout has elapsed.

Returns
true if the semaphore has been decremented, false otherwise.

Definition at line 95 of file Sem.cpp.

bool icl_core::thread::Semaphore::wait ( const icl_core::TimeStamp timeout)

Decrements the semaphore. If the semaphore is unavailable this function blocks until the absolute timeout has elapsed.

Returns
true if the semaphore has been decremented, false otherwise.

Definition at line 100 of file Sem.cpp.

Member Data Documentation

SemaphoreImpl* icl_core::thread::Semaphore::m_impl
private

Definition at line 122 of file Sem.h.


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


fzi_icl_core
Author(s):
autogenerated on Mon Jun 10 2019 13:17:59