diff options
author | Evgeny Grin (Karlson2k) <k2k@narod.ru> | 2020-10-08 21:12:13 +0300 |
---|---|---|
committer | Evgeny Grin (Karlson2k) <k2k@narod.ru> | 2020-10-08 21:12:13 +0300 |
commit | fa42f6207bf3fe3b4c5f1bee26deb8933878050f (patch) | |
tree | 6e0de54a0edd60b87bac20d4720fb58677405747 /src | |
parent | cdb146b8845ca1ae30f362de5be7c469a8ed7b95 (diff) | |
download | libmicrohttpd-fa42f6207bf3fe3b4c5f1bee26deb8933878050f.tar.gz libmicrohttpd-fa42f6207bf3fe3b4c5f1bee26deb8933878050f.zip |
mhd_threads: added and clarified comments
Diffstat (limited to 'src')
-rw-r--r-- | src/microhttpd/mhd_threads.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/microhttpd/mhd_threads.h b/src/microhttpd/mhd_threads.h index 79520d53..ee2f6020 100644 --- a/src/microhttpd/mhd_threads.h +++ b/src/microhttpd/mhd_threads.h | |||
@@ -96,11 +96,14 @@ typedef DWORD MHD_thread_ID_; | |||
96 | 96 | ||
97 | /* Depending on implementation, pthread_create() MAY set thread ID into | 97 | /* Depending on implementation, pthread_create() MAY set thread ID into |
98 | * provided pointer and after it start thread OR start thread and after | 98 | * provided pointer and after it start thread OR start thread and after |
99 | * if set thread ID. In latter case, to avoid data races, additional | 99 | * it set thread ID. In the latter case, to avoid data races, additional |
100 | * pthread_self() call is required in thread routine. Is some platform | 100 | * pthread_self() call is required in thread routine. If some platform |
101 | * is known for setting thread ID BEFORE starting thread macro | 101 | * is known for setting thread ID BEFORE starting thread macro |
102 | * MHD_PTHREAD_CREATE__SET_ID_BEFORE_START_THREAD could be defined | 102 | * MHD_PTHREAD_CREATE__SET_ID_BEFORE_START_THREAD could be defined |
103 | * to save some resources. */ | 103 | * to save some resources. */ |
104 | /* * handle - must be valid when other thread knows that particular thread | ||
105 | is started. | ||
106 | * ID - must be valid when code is executed inside thread */ | ||
104 | #if defined(MHD_USE_POSIX_THREADS) | 107 | #if defined(MHD_USE_POSIX_THREADS) |
105 | # ifdef MHD_PTHREAD_CREATE__SET_ID_BEFORE_START_THREAD | 108 | # ifdef MHD_PTHREAD_CREATE__SET_ID_BEFORE_START_THREAD |
106 | union _MHD_thread_handle_ID_ | 109 | union _MHD_thread_handle_ID_ |