6 #ifndef INCLUDED_ILM_THREAD_SEMAPHORE_H
7 #define INCLUDED_ILM_THREAD_SEMAPHORE_H
28 #if ILMTHREAD_THREADING_ENABLED
29 # if ILMTHREAD_HAVE_POSIX_SEMAPHORES
30 # include <semaphore.h>
31 # define ILMTHREAD_SEMAPHORE_POSIX 1
32 # elif defined(__APPLE__)
33 # include <AvailabilityMacros.h>
34 # if MAC_OS_X_VERSION_MIN_REQUIRED > 1050 && !defined(__ppc__)
35 # include <dispatch/dispatch.h>
36 # define ILMTHREAD_SEMAPHORE_OSX 1
38 # include <condition_variable>
40 # define ILMTHREAD_SEMAPHORE_OTHER 1
42 # elif (defined(_WIN32) || defined(_WIN64))
48 # define ILMTHREAD_SEMAPHORE_WINDOWS 1
50 # include <condition_variable>
52 # define ILMTHREAD_SEMAPHORE_OTHER 1
55 # define ILMTHREAD_SEMAPHORE_DISABLED 1
72 #if ILMTHREAD_SEMAPHORE_POSIX
74 mutable sem_t _semaphore;
76 #elif ILMTHREAD_SEMAPHORE_OSX
78 mutable dispatch_semaphore_t _semaphore;
80 #elif ILMTHREAD_SEMAPHORE_WINDOWS
82 mutable HANDLE _semaphore;
84 #elif ILMTHREAD_SEMAPHORE_OTHER
94 unsigned long numWaiting;
96 std::condition_variable nonZero;
99 mutable sema_t _semaphore;
104 Semaphore (
const Semaphore& s) =
delete;
106 Semaphore (Semaphore&& s) =
delete;
111 #endif // INCLUDED_ILM_THREAD_SEMAPHORE_H
GLsizei const GLfloat * value
#define ILMTHREAD_INTERNAL_NAMESPACE_HEADER_ENTER
#define ILMTHREAD_INTERNAL_NAMESPACE_HEADER_EXIT
#define ILMTHREAD_EXPORT_TYPE
LeafData & operator=(const LeafData &)=delete