- diff --git a/libtirpc/src/clnt_dg.c b/libtirpc/src/clnt_dg.c
- index 529a401..2753510 100644
- --- a/libtirpc/src/clnt_dg.c
- +++ b/libtirpc/src/clnt_dg.c
- @@ -110,7 +110,7 @@ static cond_t *dg_cv;
- dg_fd_locks[(fd)] = 0; \
- mutex_unlock(&clnt_fd_lock); \
- \
- - cond_signal(&dg_cv[(fd)]); \
- + cond_broadcast(&dg_cv[(fd)]); \
- }
- #endif
- @@ -612,7 +612,7 @@ clnt_dg_freeres(cl, xdr_res, res_ptr)
- dummy = (*xdr_res)(xdrs, res_ptr);
- mutex_unlock(&clnt_fd_lock);
- // thr_sigsetmask(SIG_SETMASK, &mask, NULL);
- - cond_signal(&dg_cv[cu->cu_fd]);
- + cond_broadcast(&dg_cv[cu->cu_fd]);
- return (dummy);
- }
- @@ -803,7 +803,7 @@ clnt_dg_destroy(cl)
- mem_free(cl, sizeof (CLIENT));
- mutex_unlock(&clnt_fd_lock);
- // thr_sigsetmask(SIG_SETMASK, &mask, NULL);
- - cond_signal(&dg_cv[cu_fd]);
- + cond_broadcast(&dg_cv[cu_fd]);
- }
- static struct clnt_ops *
- diff --git a/libtirpc/src/clnt_vc.c b/libtirpc/src/clnt_vc.c
- index e0a9d30..1fcec9c 100644
- --- a/libtirpc/src/clnt_vc.c
- +++ b/libtirpc/src/clnt_vc.c
- @@ -748,7 +748,7 @@ clnt_vc_freeres(cl, xdr_res, res_ptr)
- dummy = (*xdr_res)(xdrs, res_ptr);
- mutex_unlock(&clnt_fd_lock);
- // thr_sigsetmask(SIG_SETMASK, &(mask), NULL);
- - cond_signal(&vc_cv[ct->ct_fd]);
- + cond_broadcast(&vc_cv[ct->ct_fd]);
- return dummy;
- }
- @@ -923,7 +923,7 @@ clnt_vc_destroy(cl)
- GetCurrentThreadId(), cl->cb_thread);
- cl->shutdown = 1;
- mutex_unlock(&clnt_fd_lock);
- - cond_signal(&vc_cv[ct_fd]);
- + cond_broadcast(&vc_cv[ct_fd]);
- status = WaitForSingleObject(cl->cb_thread, INFINITE);
- fprintf(stdout, "%04x: terminated callback thread\n", GetCurrentThreadId());
- mutex_lock(&clnt_fd_lock);
- @@ -945,7 +945,7 @@ clnt_vc_destroy(cl)
- mem_free(cl, sizeof(CLIENT));
- mutex_unlock(&clnt_fd_lock);
- // thr_sigsetmask(SIG_SETMASK, &(mask), NULL);
- - cond_signal(&vc_cv[ct_fd]);
- + cond_broadcast(&vc_cv[ct_fd]);
- }
- /*
libtirpc: Switch condition variable from signal to broadcast, to see whether it fixes hangs
Posted by Anonymous on Sat 28th Oct 2023 10:51
raw | new post
Submit a correction or amendment below (click here to make a fresh posting)
After submitting an amendment, you'll be able to view the differences between the old and new posts easily.