From: Peter Osterlund <petero2@telia.com>
To: Manfred Spraul <manfred@colorfullife.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] remove sleep_on from sunrpc
Date: 18 Jan 2004 02:45:36 +0100 [thread overview]
Message-ID: <m2wu7qf2rj.fsf@p4.localdomain> (raw)
In-Reply-To: <40098260.20800@colorfullife.com>
Manfred Spraul <manfred@colorfullife.com> writes:
> - while (rpciod_pid) {
> + add_wait_queue(&rpciod_killer, &wait);
> + for (;;) {
> + set_current_state(TASK_INTERRUPTIBLE);
> + if (rpciod_pid == 0)
> + break;
> dprintk("rpciod_down: waiting for pid %d to exit\n", rpciod_pid);
> if (signalled()) {
> dprintk("rpciod_down: caught signal\n");
> break;
> }
> - interruptible_sleep_on(&rpciod_killer);
> + schedule();
> }
> - spin_lock_irqsave(¤t->sighand->siglock, flags);
> + remove_wait_queue(&rpciod_killer, &wait);
> + spin_lock_irq(¤t->sighand->siglock);
> recalc_sigpending();
> - spin_unlock_irqrestore(¤t->sighand->siglock, flags);
> + spin_unlock_irq(¤t->sighand->siglock);
> out:
> up(&rpciod_sema);
> }
Aren't you forgetting to set_current_state(TASK_RUNNING) after the
loop?
--
Peter Osterlund - petero2@telia.com
http://w1.894.telia.com/~u89404340
prev parent reply other threads:[~2004-01-18 1:42 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-01-17 18:43 Manfred Spraul
2004-01-18 1:45 ` Peter Osterlund [this message]
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=m2wu7qf2rj.fsf@p4.localdomain \
--to=petero2@telia.com \
--cc=linux-kernel@vger.kernel.org \
--cc=manfred@colorfullife.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome