lkml.org 
[lkml]   [2004]   [Jan]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] remove sleep_on from sunrpc
From
Date
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(&current->sighand->siglock, flags);
> + remove_wait_queue(&rpciod_killer, &wait);
> + spin_lock_irq(&current->sighand->siglock);
> recalc_sigpending();
> - spin_unlock_irqrestore(&current->sighand->siglock, flags);
> + spin_unlock_irq(&current->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
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:00    [W:0.035 / U:0.804 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site