diff options
author | David Timber <mieabby@gmail.com> | 2020-08-29 17:09:10 +0930 |
---|---|---|
committer | David Timber <mieabby@gmail.com> | 2020-08-29 17:20:37 +0930 |
commit | f36333b2c915ac7d9cf82e09ab5cb2a2f8296177 (patch) | |
tree | 48e28c7750c99414bc1430ffefbd9fbaa26788e5 /src/proone-resolv.c | |
parent | acf0b7a45171555eba2c10a6ef84f915c62f6791 (diff) |
* _POSIX_C_SOURCE=199506L
* Add proone-htbthost
* Add prne_iobuf, use it in resolv, htbt
* memzero() -> prne_memzero() now as a function
* Add prne_mbedtls_pth_handle()
* Protocol changes
* Remove prne_unint_*()
* Add src/proone_conf.skel
Diffstat (limited to 'src/proone-resolv.c')
-rw-r--r-- | src/proone-resolv.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/proone-resolv.c b/src/proone-resolv.c index 73198fe..490f861 100644 --- a/src/proone-resolv.c +++ b/src/proone-resolv.c @@ -165,7 +165,9 @@ static void *stdout_wkr_entry (void *ctx) { bool output = false; while (main_flag || prm_list.size > 0) { - prne_assert(prne_pth_cond_timedwait(&prm_cv, NULL, NULL)); + pth_mutex_acquire(prm_cv.lock, FALSE, NULL); + pth_cond_await(prm_cv.cond, prm_cv.lock, NULL); + pth_mutex_release(prm_cv.lock); cur = prm_list.head; while (cur != NULL) { @@ -279,7 +281,7 @@ int main (void) { main_flag = false; close(STDIN_FILENO); - prne_pth_cv_notify(&prm_cv); + prne_pth_cv_notify(prm_cv.lock, prm_cv.cond, true); for (size_t i = 0; i < sizeof(wkr_arr)/sizeof(prne_worker_t); i += 1) { prne_fin_worker(wkr_arr + i); } |