X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=src%2Fjobs.c;fp=src%2Fjobs.c;h=e3df8f576fdfb5d5ce8ef774097809cb51c893fb;hb=8a0bde7a0b5b61a08a43a5bf374fc4705b788684;hp=464f1e11e76322b3e8e8a6299771715d4c8e5e95;hpb=2195a00dc5b70636ccf57563cf907cb3a4b62afc;p=src%2Fapp-framework-binder.git diff --git a/src/jobs.c b/src/jobs.c index 464f1e11..e3df8f57 100644 --- a/src/jobs.c +++ b/src/jobs.c @@ -636,7 +636,9 @@ static int on_evloop_efd(sd_event_source *s, int fd, uint32_t revents, void *use uint64_t x; struct evloop *evloop = userdata; read(evloop->efd, &x, sizeof x); - pthread_cond_signal(&evloop->cond); + pthread_mutex_lock(&mutex); + pthread_cond_broadcast(&evloop->cond); + pthread_mutex_unlock(&mutex); return 1; } @@ -656,7 +658,7 @@ struct sd_event *jobs_get_sd_event() el = &evloop[0]; if (!el->sdev) { /* creates the eventfd for waking up polls */ - el->efd = eventfd(0, EFD_CLOEXEC|EFD_SEMAPHORE); + el->efd = eventfd(0, EFD_CLOEXEC); if (el->efd < 0) { ERROR("can't make eventfd for events"); goto error1;