class toSemaphore

# class toSemaphore | Encapsulation of pthread semaphores. More...
Definition | `#include <tothread.h>`
List of all Methods
Annotated List
Files
Globals
Hierarchy
Index

#### Public Methods

- toSemaphore ()
- toSemaphore (int val)
- ~toSemaphore ()
- void up ()
- void down ()
- int getValue ()
- toSemaphore ()
- toSemaphore (const toSemaphore &)
- toSemaphore (int val)
- void up ()
- void down ()
- int getValue ()

## Detailed Description

Encapsulation of pthread semaphores. A semaphore can be raise to any value but will wait till raised above zero when lowered below 0. Can also be implemented without pthreads using Qt multithreaded primitives. Observe that these function different than Qt semaphores.

toSemaphore () | ### toSemaphore

toSemaphore (int val) | ### toSemaphore

~toSemaphore () | ### ~toSemaphore

void up () | ### up

void down () | ### down

int getValue () | ### getValue

toSemaphore () | ### toSemaphore

Create semaphore

toSemaphore (const toSemaphore &) | ### toSemaphore

Unimplemented copy constructor.

toSemaphore (int val) | ### toSemaphore

Create semaphore

Parameters:

val | Value of new semaphore.

void up () | ### up

Increase semaphore value by 1.

void down () | ### down

Decrease semaphore value by 1, wait for it to never go below 0.

int getValue () | ### getValue

Get current semaphore value.

Generated by: nneul on skyhawk on Wed Feb 23 19:49:58 2005, using kdoc 2.0a54.