From 02ff145c51439873db3cdc192b48e47e2272b0b9 Mon Sep 17 00:00:00 2001 From: "/C=EU/ST=EU/CN=Pablo Neira Ayuso/emailAddress=pablo@netfilter.org" Date: Tue, 22 Jan 2008 01:28:07 +0000 Subject: Max Kellermann : - Save initialization stage in the __run() loop --- src/run.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/run.c b/src/run.c index bf2798d..fe57858 100644 --- a/src/run.c +++ b/src/run.c @@ -233,19 +233,16 @@ void __attribute__((noreturn)) run(void) { struct timeval next_alarm; - struct timeval *next; - - /* initialization: get the next alarm available */ - next = get_next_alarm_run(&next_alarm); + struct timeval *next = NULL; while(1) { - __run(next); - sigprocmask(SIG_BLOCK, &STATE(block), NULL); if (next != NULL && !timerisset(next)) next = do_alarm_run(&next_alarm); else next = get_next_alarm_run(&next_alarm); sigprocmask(SIG_UNBLOCK, &STATE(block), NULL); + + __run(next); } } -- cgit v1.2.3