diff options
Diffstat (limited to 'src/include/platform_interface.h')
-rw-r--r-- | src/include/platform_interface.h | 35 |
1 files changed, 0 insertions, 35 deletions
diff --git a/src/include/platform_interface.h b/src/include/platform_interface.h index eba7612b..13f54530 100644 --- a/src/include/platform_interface.h +++ b/src/include/platform_interface.h | |||
@@ -189,41 +189,6 @@ typedef int _MHD_socket_funcs_size; | |||
189 | #else | 189 | #else |
190 | #define MHD_random_() MHD_W32_random_() | 190 | #define MHD_random_() MHD_W32_random_() |
191 | #endif | 191 | #endif |
192 | |||
193 | #if defined(MHD_USE_POSIX_THREADS) | ||
194 | typedef pthread_t MHD_thread_handle_; | ||
195 | #elif defined(MHD_USE_W32_THREADS) | ||
196 | #include <windows.h> | ||
197 | typedef HANDLE MHD_thread_handle_; | ||
198 | #else | ||
199 | #error "No threading API is available." | ||
200 | #endif | ||
201 | |||
202 | #if defined(MHD_USE_POSIX_THREADS) | ||
203 | #define MHD_THRD_RTRN_TYPE_ void* | ||
204 | #define MHD_THRD_CALL_SPEC_ | ||
205 | #elif defined(MHD_USE_W32_THREADS) | ||
206 | #define MHD_THRD_RTRN_TYPE_ unsigned | ||
207 | #define MHD_THRD_CALL_SPEC_ __stdcall | ||
208 | #endif | ||
209 | |||
210 | #if defined(MHD_USE_POSIX_THREADS) | ||
211 | /** | ||
212 | * Wait until specified thread is ended | ||
213 | * @param thread ID to watch | ||
214 | * @return zero on success, nonzero on failure | ||
215 | */ | ||
216 | #define MHD_join_thread_(thread) pthread_join((thread), NULL) | ||
217 | #elif defined(MHD_USE_W32_THREADS) | ||
218 | /** | ||
219 | * Wait until specified thread is ended | ||
220 | * Close thread handle on success | ||
221 | * @param thread handle to watch | ||
222 | * @return zero on success, nonzero on failure | ||
223 | */ | ||
224 | #define MHD_join_thread_(thread) (WAIT_OBJECT_0 == WaitForSingleObject((thread), INFINITE) ? (CloseHandle((thread)), 0) : 1 ) | ||
225 | #endif | ||
226 | |||
227 | #if defined(MHD_USE_W32_THREADS) | 192 | #if defined(MHD_USE_W32_THREADS) |
228 | #define MHD_W32_MUTEX_ 1 | 193 | #define MHD_W32_MUTEX_ 1 |
229 | #include <windows.h> | 194 | #include <windows.h> |