Tasklet questions - Embedded

This is a discussion on Tasklet questions - Embedded ; Consider I have an interrupt handler function, and inside it I call tasklet_schedule(my_tasklet) . An interrupt occurs, the IR-handler starts and tasklet_schedule(my_tasklet) is called. When will my_tasklet be scheduled to run? Can I be sure that my_tasklet will start to ...

+ Reply to Thread
Results 1 to 2 of 2

Thread: Tasklet questions

  1. Tasklet questions


    Consider I have an interrupt handler function, and inside it I call
    tasklet_schedule(my_tasklet) .

    An interrupt occurs, the IR-handler starts and
    tasklet_schedule(my_tasklet) is called. When will my_tasklet be
    scheduled to run? Can I be sure that my_tasklet will start to run
    directly after the IR-handler returns? Or is it possible that a kernel
    thread (or another my_tasklet) can start/continue to run before
    my_tasklet?

    Do tasklets take priority over kernel threads?

    What about if a new interrupt of the same type occurs while my_tasklet
    is running, will my_tasklet be interrupted and the IR-handler run again
    and another my_tasklet will be scheduled? When will the new scheduled
    my_tasklet start to execute? Directly after the first my_tasklet
    finnishes?

    Anyone understand my questions?

    BRs!


  2. Re: Tasklet questions

    dspfun wrote:
    > Consider I have an interrupt handler function, and inside it I call
    > tasklet_schedule(my_tasklet) .
    >
    > An interrupt occurs, the IR-handler starts and
    > tasklet_schedule(my_tasklet) is called. When will my_tasklet be
    > scheduled to run? Can I be sure that my_tasklet will start to run
    > directly after the IR-handler returns? Or is it possible that a kernel
    > thread (or another my_tasklet) can start/continue to run before
    > my_tasklet?


    As far as I know your tasklet will run only once if you schedule it many times.
    It will run when the kernel thinks it is a good time, which may be later.

    > Do tasklets take priority over kernel threads?
    >
    > What about if a new interrupt of the same type occurs while my_tasklet
    > is running, will my_tasklet be interrupted and the IR-handler run again
    > and another my_tasklet will be scheduled? When will the new scheduled
    > my_tasklet start to execute? Directly after the first my_tasklet
    > finnishes?


    It will run when the kernel thinks it is a good time, which may be later.

    >
    > Anyone understand my questions?
    >
    > BRs!
    >


    Good luck,
    Edwin

+ Reply to Thread