From 6425a9ff6a62497b9e317e6d820288bd5d30af72 Mon Sep 17 00:00:00 2001 From: Jongkyu Koo Date: Mon, 27 Feb 2017 14:44:53 +0900 Subject: [PATCH] change poll() timeout to -1 for power saving Change-Id: Ic46c546675179eae22fcfd1f76bef6aa98deeb3f Signed-off-by: Jongkyu Koo --- src/pims-ipc-worker.c | 2 +- src/pims-ipc.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pims-ipc-worker.c b/src/pims-ipc-worker.c index 657382f..d36c2fc 100644 --- a/src/pims-ipc-worker.c +++ b/src/pims-ipc-worker.c @@ -398,7 +398,7 @@ static void* __worker_loop(void *data) pollfds[0].revents = 0; while (!worker_data->stop_thread) { - ret = poll(pollfds, 1, 3000); /* waiting command from router */ + ret = poll(pollfds, 1, -1); /* waiting command from router */ if (-1 == ret) { if (errno != EINTR) ERR("poll() Fail(%d)", errno); diff --git a/src/pims-ipc.c b/src/pims-ipc.c index 05bb611..9b20b3d 100644 --- a/src/pims-ipc.c +++ b/src/pims-ipc.c @@ -592,7 +592,7 @@ static void* __io_thread(void *data) pthread_mutex_unlock(&__gmutex); struct epoll_event events[MAX_EPOLL_EVENT] = {{0}, }; - int event_num = epoll_wait(epfd, events, MAX_EPOLL_EVENT, 50); + int event_num = epoll_wait(epfd, events, MAX_EPOLL_EVENT, -1); pthread_mutex_lock(&__gmutex); -- 2.7.4