Re: wake_up from interrupt handler

From: Arjan van de Ven (arjanv@redhat.com)
Date: Mon Oct 07 2002 - 10:36:37 EST


On Mon, 2002-10-07 at 16:25, Amol Lad wrote:
> In this code too.. lost-wakeup problem is not solved
>
> if (event_occured)
> else
> schedule();
>
> what if in check ' if(event_occured) ' goes to 'else'
> and before calling schedule() my ISR interrupted this
> thread and set the event..

that's fine; the wake_up() will mark your process as TASK_RUNNING at
which point the schedule() is effectively a NOP, at which point your
event loop just loops immediatly again -> no problem

always keep interrupts enabled during this, no need to block them ;)



-
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/



This archive was generated by hypermail 2b29 : Mon Oct 07 2002 - 22:00:58 EST