All of lore.kernel.org
 help / color / mirror / Atom feed
From: Max Kellermann <max@duempel.org>
To: Pablo Neira Ayuso <pablo@netfilter.org>
Cc: netfilter-devel@vger.kernel.org
Subject: Re: [PATCH 2/4] don't ignore fd events when an alarm is due
Date: Mon, 21 Jan 2008 15:09:30 +0100	[thread overview]
Message-ID: <20080121140930.GA2455@swift.blarg.de> (raw)
In-Reply-To: <47949AA4.9070000@netfilter.org>

On 2008/01/21 14:14, Pablo Neira Ayuso <pablo@netfilter.org> wrote:
> Max Kellermann wrote:
> > also, pass &next_alarm to __run() only if there is an alarm; eliminate
> > the "timeout" parameter; the alarm functions get_next_alarm_run() and
> > do_alarm_run() return an timeval pointer instead of a boolean.
> 
> Hm, this patch makes my CPU suck up after the first alarm run.

Damn.  I forgot a "!".

commit 02683a053a26e142e8067b0e884ff5c49af908d4
Author: Max Kellermann <max@duempel.org>
Date:   Mon Jan 21 15:13:38 2008 +0100

    added "!" before timerisset(next)

diff --git a/src/run.c b/src/run.c
index 718e63c..fe57858 100644
--- a/src/run.c
+++ b/src/run.c
@@ -237,7 +237,7 @@ run(void)
 
 	while(1) {
 		sigprocmask(SIG_BLOCK, &STATE(block), NULL);
-		if (next != NULL && timerisset(next))
+		if (next != NULL && !timerisset(next))
 			next = do_alarm_run(&next_alarm);
 		else
 			next = get_next_alarm_run(&next_alarm);

  reply	other threads:[~2008-01-21 14:09 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-21  8:29 [PATCH 0/4] fix SEGV, some run.c API stuff Max Kellermann
2008-01-21  8:29 ` [PATCH 4/4] call __run() after do_alarm_run() Max Kellermann
2008-01-22  1:30   ` Pablo Neira Ayuso
2008-01-21  8:29 ` [PATCH 1/4] check nfct_get_attr()!=NULL Max Kellermann
2008-01-21 12:53   ` Pablo Neira Ayuso
2008-01-21 12:58     ` Max Kellermann
2008-01-21 13:07       ` Pablo Neira Ayuso
2008-01-21  8:29 ` [PATCH 2/4] don't ignore fd events when an alarm is due Max Kellermann
2008-01-21 13:14   ` Pablo Neira Ayuso
2008-01-21 14:09     ` Max Kellermann [this message]
2008-01-22  1:29   ` Pablo Neira Ayuso
2008-01-21  8:29 ` [PATCH 3/4] __run() returns void Max Kellermann
2008-01-21 13:22   ` Pablo Neira Ayuso
2008-01-22  1:29   ` Pablo Neira Ayuso

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080121140930.GA2455@swift.blarg.de \
    --to=max@duempel.org \
    --cc=netfilter-devel@vger.kernel.org \
    --cc=pablo@netfilter.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.