uThreads  0.3.0
Public Member Functions | List of all members
Semaphore Class Reference

A user-level Semaphore. More...

#include <BlockingSync.h>

Public Member Functions

 Semaphore (mword c=0)
 Create a new Semaphore. More...
bool P ()
 Decrement the value of the Semaphore. More...
void V ()
 increment the value of the Semaphore

Detailed Description

A user-level Semaphore.

blocks in user levle by blocking uThreads and does not cause kernel threads to block.

Constructor & Destructor Documentation

Semaphore::Semaphore ( mword  c = 0)

Create a new Semaphore.

cInitial value of the Semaphore

Member Function Documentation

bool Semaphore::P ( )

Decrement the value of the Semaphore.

Whether it was successful or not

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