Browse Source

MT#55283 increase poller wait time to forever

Change-Id: I1df315d9f5382a974d67471f0f2eedec0eb9cb69
pull/1993/merge
Richard Fuchs 2 weeks ago
parent
commit
750c00618f
2 changed files with 2 additions and 6 deletions
  1. +1
    -5
      daemon/main.c
  2. +1
    -1
      lib/auxlib.h

+ 1
- 5
daemon/main.c View File

@ -135,7 +135,6 @@ struct interface_config_callback_arg {
static void sighandler(gpointer x) {
sigset_t ss;
int ret;
struct timespec ts;
sigemptyset(&ss);
sigaddset(&ss, SIGINT);
@ -144,12 +143,9 @@ static void sighandler(gpointer x) {
sigaddset(&ss, SIGUSR1);
sigaddset(&ss, SIGUSR2);
ts.tv_sec = thread_sleep_time / 1000;
ts.tv_nsec = (thread_sleep_time % 1000) * 1000 * 1000;
while (!rtpe_shutdown) {
thread_cancel_enable();
ret = sigtimedwait(&ss, NULL, &ts);
ret = sigwaitinfo(&ss, NULL);
thread_cancel_disable();
if (ret == -1) {


+ 1
- 1
lib/auxlib.h View File

@ -192,7 +192,7 @@ INLINE int __cond_timedwait_tv(cond_t *c, mutex_t *m, int64_t tv) {
#ifndef ASAN_BUILD
#define thread_cancel_enable() pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, NULL)
#define thread_cancel_disable() pthread_setcancelstate(PTHREAD_CANCEL_DISABLE, NULL)
#define thread_sleep_time 10000 /* ms */
#define thread_sleep_time -1 // forever
#define thread_cleanup_push pthread_cleanup_push
#define thread_cleanup_pop pthread_cleanup_pop
#else


Loading…
Cancel
Save