lkml.org 
[lkml]   [2002]   [Oct]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    SubjectRe: wake_up from interrupt handler
    From
    Date
    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 ;)
    [unhandled content-type:application/pgp-signature]
    \
     
     \ /
      Last update: 2005-03-22 13:29    [W:0.025 / U:123.012 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site