library of assembled shared sources

http://lass.cocamware.com

lass::util::Semaphore Class Reference
[Threading]

Lean and mean synchronisation object, without OS support. More...

#include <thread.h>

Inheritance diagram for lass::util::Semaphore:

Inheritance graph
[legend]
Collaboration diagram for lass::util::Semaphore:

Collaboration graph
[legend]

Public Member Functions

 Semaphore (int iNumberOfSlots=1)
void lock ()
const LockResult tryLock ()
void unlock ()
const bool isLocked () const

Private Member Functions

void swap (NonCopyable &)

Private Attributes

volatile int freeSlots_

Detailed Description

Lean and mean synchronisation object, without OS support.

See also:
SemaphoreLocker
Author:
Bram de Greve
Date:
2004
This semaphore is built upon atomic operations that are programmed in assembly.

Definition at line 335 of file thread.h.


Constructor & Destructor Documentation

lass::util::Semaphore::Semaphore ( int  iNumberOfSlots = 1  )  [inline]

Definition at line 338 of file thread.h.


Member Function Documentation

void lass::util::Semaphore::lock (  )  [inline]

const LockResult lass::util::Semaphore::tryLock (  )  [inline]

void lass::util::Semaphore::unlock (  )  [inline]

const bool lass::util::Semaphore::isLocked (  )  const [inline]

Definition at line 374 of file thread.h.

void lass::util::NonCopyable::swap ( NonCopyable  )  [inline, protected, inherited]

Definition at line 60 of file non_copyable.h.

Referenced by lass::io::Image::readLine().


Field Documentation

volatile int lass::util::Semaphore::freeSlots_ [private]

Definition at line 380 of file thread.h.


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

Generated on Mon Nov 10 14:22:17 2008 for Library of Assembled Shared Sources by doxygen 1.5.7.1
SourceForge.net Logo