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
73 #if ILMTHREAD_SEMAPHORE_POSIX
75 mutable sem_t _semaphore;
77 #elif ILMTHREAD_SEMAPHORE_OSX
79 mutable dispatch_semaphore_t _semaphore;
81 #elif ILMTHREAD_SEMAPHORE_WINDOWS
83 mutable HANDLE _semaphore;
85 #elif ILMTHREAD_SEMAPHORE_OTHER
95 unsigned long numWaiting;
97 std::condition_variable nonZero;
100 mutable sema_t _semaphore;
105 Semaphore (
const Semaphore& s) =
delete;
107 Semaphore (Semaphore&& s) =
delete;
112 #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