[lkml]   [2002]   [Mar]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: Killing tasklet from interrupt
    On Mon, 18 Mar 2002, Jean Tourrilhes wrote:

    > Hi,
    > I'm trying to use tasklets and I've come across one problem. I
    > need to kill a tasklet from a timer, and I wonder if it's legal.
    > Code :
    > -> User close IrDA TSAP and goes away
    > -> LSAP not clean, more work to do
    > -> Schedule timer in one second
    > -> Timer
    > -> If LSAP clean and nothing to do
    > -> Kill tasklet
    > -> Destroy LSAP
    > -> Else re-shedule timer
    > The tasklet is used in the Rx path, so may be scheduled after
    > the user close the TSAP. The TSAP may interface to the socket code, to
    > the TTY code, to the Ethernet code or the PPP code, so we are not even
    > guaranteed that the TSAP closure is done from a user context (fun,
    > fun, fun).
    > To be fair, the timer API is much more versatile in that
    > respect. What I think I need is a tasklet_try_kill()...
    > Regards,
    > Jean

    You have the tasklet kill itself the next time it executes. Set some
    flag so it knows it should give up its timer-slot and expire. The
    interrupt sets the flag. It doesn't do anything else.

    Dick Johnson

    Penguin : Linux version 2.4.18 on an i686 machine (797.90 BogoMips).

    Windows-2000/Professional isn't.

    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to
    More majordomo info at
    Please read the FAQ at

     \ /
      Last update: 2005-03-22 13:21    [W:0.022 / U:12.228 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site