18 #ifndef __itkSemaphore_h
19 #define __itkSemaphore_h
24 #ifdef ITK_USE_UNIX_IPC_SEMAPHORES
27 #include <sys/types.h>
33 #ifndef ITK_USE_UNIX_IPC_SEMAPHORES
34 #ifdef ITK_USE_PTHREADS
38 #include <semaphore.h>
43 #ifdef ITK_USE_WIN32_THREADS
49 #ifdef ITK_USE_UNIX_IPC_SEMAPHORES
53 #ifndef ITK_USE_UNIX_IPC_SEMAPHORES
54 #ifdef ITK_USE_PTHREADS
67 #ifdef ITK_USE_WIN32_THREADS
71 #ifndef ITK_USE_UNIX_IPC_SEMAPHORES
72 #ifndef ITK_USE_PTHREADS
73 #ifndef ITK_USE_WIN32_THREADS
118 void Initialize(
unsigned int value);
141 std::string NeverUseThisCompilerWarningAvoidanceFunctionForPad1Pad2(
void)
const
143 return std::string(this->m_Pad1)+
"-"+std::string(this->m_Pad2);
147 #ifdef ITK_USE_UNIX_IPC_SEMAPHORES
150 static int m_IPCSemaphoreKey;
155 int UnixIpcSemaphoreCreate(
int unix_semaphore_key);
157 void UnixIpcSemaphoreRemove(
int sid);
159 void UnixIpcSemaphoreCall(
int sid,
int op);
161 void UnixIpcSemaphoreDown(
int sid);
163 void UnixIpcSemaphoreUp(
int sid);
176 std::string GetUniqueName();
178 static int m_SemaphoreCount;
179 std::string m_SemaphoreName;
183 #ifdef ITK_USE_PTHREADS
184 bool m_PThreadsSemaphoreRemoved;