diff options
Diffstat (limited to 'src/microhttpd/mhd_threads.h')
-rw-r--r-- | src/microhttpd/mhd_threads.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/microhttpd/mhd_threads.h b/src/microhttpd/mhd_threads.h index 49bd77b8..d5424659 100644 --- a/src/microhttpd/mhd_threads.h +++ b/src/microhttpd/mhd_threads.h | |||
@@ -123,6 +123,22 @@ | |||
123 | #define MHD_join_thread_(thread) (WAIT_OBJECT_0 == WaitForSingleObject((thread), INFINITE) ? (CloseHandle((thread)), !0) : 0) | 123 | #define MHD_join_thread_(thread) (WAIT_OBJECT_0 == WaitForSingleObject((thread), INFINITE) ? (CloseHandle((thread)), !0) : 0) |
124 | #endif | 124 | #endif |
125 | 125 | ||
126 | #if defined(MHD_USE_POSIX_THREADS) | ||
127 | /** | ||
128 | * Check whether provided thread ID match current thread. | ||
129 | * @param ID thread ID to match | ||
130 | * @return nonzero on match, zero otherwise | ||
131 | */ | ||
132 | #define MHD_thread_ID_match_current_(ID) (pthread_equal((ID), pthread_self())) | ||
133 | #elif defined(MHD_USE_W32_THREADS) | ||
134 | /** | ||
135 | * Check whether provided thread ID match current thread. | ||
136 | * @param ID thread ID to match | ||
137 | * @return nonzero on match, zero otherwise | ||
138 | */ | ||
139 | #define MHD_thread_ID_match_current_(ID) (GetCurrentThreadId() == (ID)) | ||
140 | #endif | ||
141 | |||
126 | /** | 142 | /** |
127 | * Signature of main function for a thread. | 143 | * Signature of main function for a thread. |
128 | * | 144 | * |