Main Page   Class Hierarchy   Compound List   File List   Compound Members   File Members  

semaphore.h

Go to the documentation of this file.
00001 //**************************************************************************
00002 #ifndef _SEMAPHORE_H_
00003 #define _SEMAPHORE_H_
00004 //**************************************************************************
00005 #include <stdio.h>
00006 #include <pthread.h>
00007 #include <sys/errno.h>
00008 //**************************************************************************
00009 class Semaphore
00010 {
00011 private:
00012         pthread_mutex_t mutex;
00013         int waitcount;
00014         int postcount;
00015 
00016 public:
00017         Semaphore();
00018         ~Semaphore();
00019 
00021         bool isBusy();
00022 
00024         int Wait();
00025 
00027         int Post();
00028 
00030         int WaitCount();
00031 
00033         int PostCount();
00034 };
00035 //**************************************************************************
00036 #endif  // _SEMAPHORE_H_
00037 //**************************************************************************

Generated on Sun Jun 16 17:36:42 2002 for Anirudh's Vortex-Wake Simulation Code by doxygen1.2.13.1 written by Dimitri van Heesch, © 1997-2001