[stgt] [PATCH 2/3] remove epoll timeout

FUJITA Tomonori fujita.tomonori at lab.ntt.co.jp
Thu Jan 20 07:26:03 CET 2011


we have the timer file descriptor so we don't need epoll timeout any
more.

Signed-off-by: FUJITA Tomonori <fujita.tomonori at lab.ntt.co.jp>
---
 usr/tgtd.c |    4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)

diff --git a/usr/tgtd.c b/usr/tgtd.c
index 5b000d3..13ff65c 100644
--- a/usr/tgtd.c
+++ b/usr/tgtd.c
@@ -329,8 +329,6 @@ static int tgt_exec_scheduled(void)
 	return work_remains;
 }
 
-#define TGTD_EVENT_TIMEOUT	2000
-
 static void event_loop(void)
 {
 	int nevent, i, sched_remains, timeout;
@@ -339,7 +337,7 @@ static void event_loop(void)
 
 retry:
 	sched_remains = tgt_exec_scheduled();
-	timeout = sched_remains ? 0 : TGTD_EVENT_TIMEOUT;
+	timeout = sched_remains ? 0 : -1;
 
 	nevent = epoll_wait(ep_fd, events, ARRAY_SIZE(events), timeout);
 	if (nevent < 0) {
-- 
1.7.1

--
To unsubscribe from this list: send the line "unsubscribe stgt" in
the body of a message to majordomo at vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html



More information about the stgt mailing list