logwatcher: Use cond_signal instead of cond_broadcast on watcher_cond

as there is only one thread waiting
parent 12471981
......@@ -5391,7 +5391,7 @@ fellow_logs_rewrite(struct fellow_fd *ffd,
AZ(pthread_mutex_lock(&ffd->logmtx));
ffd->rewriting = 0;
if (ffd->watcher_running)
AZ(pthread_cond_broadcast(&ffd->watcher_cond));
AZ(pthread_cond_signal(&ffd->watcher_cond));
AZ(pthread_mutex_unlock(&ffd->logmtx));
ffd->diag("... done: %fs\n", VTIM_mono() - t0);
}
......@@ -5761,7 +5761,7 @@ static void
fellow_logwatcher_kick_locked(struct fellow_fd *ffd)
{
if (ffd->phase == FP_OPEN && ffd->watcher_running)
AZ(pthread_cond_broadcast(&ffd->watcher_cond));
AZ(pthread_cond_signal(&ffd->watcher_cond));
}
// not unter logmtx
......@@ -5794,7 +5794,7 @@ fellow_logwatcher_fini(struct fellow_fd *ffd)
AZ(pthread_mutex_lock(&ffd->logmtx));
ffd->watcher_running = 0;
AZ(pthread_cond_broadcast(&ffd->watcher_cond));
AZ(pthread_cond_signal(&ffd->watcher_cond));
AZ(pthread_mutex_unlock(&ffd->logmtx));
AZ(pthread_join(ffd->watcher_thread, NULL));
AZ(pthread_cond_destroy(&ffd->watcher_cond));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment