25 #ifndef STTCLPOSIXSEMAPHORE_H_
26 #define STTCLPOSIXSEMAPHORE_H_
28 #if defined(STTCL_POSIX_THREADS) or defined(STTCL_POSIX_IMPL)
30 #include <semaphore.h>
31 #include "../include/SttclTime.h"
43 class SttclPosixSemaphore
46 typedef sem_t NativeSemaphoreType;
48 SttclPosixSemaphore(
unsigned int initialCount);
49 virtual ~SttclPosixSemaphore();
52 bool try_wait(
const TimeDuration<>& timeout);
56 NativeSemaphoreType semaphore;