Re: [PATCH] Completion API extension

From: Thomas Gleixner
Date: Fri Oct 22 2004 - 02:09:00 EST


On Fri, 2004-10-22 at 04:18, Dmitry Torokhov wrote:

Hi,

it's resubmitted in a correct version already.

Thanks,

tglx


> Hi,
>
> On Wednesday 20 October 2004 11:31 am, Thomas Gleixner wrote:
> > +unsigned long fastcall __sched
> > +wait_for_completion_interruptible_timeout(struct completion *x,
> > + unsigned long timeout)
> > +{
> > + might_sleep();
> > +
> > + spin_lock_irq(&x->wait.lock);
> > + if (!x->done) {
> > + DECLARE_WAITQUEUE(wait, current);
> > +
> > + wait.flags |= WQ_FLAG_EXCLUSIVE;
> > + __add_wait_queue_tail(&x->wait, &wait);
> > + do {
> > + if (signal_pending(current)) {
> > + timeout = -ERESTARTSYS;
> > + goto out;
> > + }
> > + __set_current_state(TASK_INTERRUPTIBLE);
> > + spin_unlock_irq(&x->wait.lock);
> > + schedule();
>
> ^^^^^^^^^^^^^^^^^^
>
> schedule_timeout perhaps?
>

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/