|
IBR-DTNSuite 0.6
|
00001 #ifndef IBRCOMMON_SEMAPHORE_H_ 00002 #define IBRCOMMON_SEMAPHORE_H_ 00003 00004 #include <semaphore.h> 00005 00006 namespace ibrcommon 00007 { 00008 class Semaphore 00009 { 00010 public: 00011 Semaphore(unsigned int value = 0); 00012 virtual ~Semaphore(); 00013 00014 void wait(); 00015 void post(); 00016 00017 private: 00018 sem_t count_sem; 00019 }; 00020 } 00021 #endif /*SEMAPHORE_H_*/