Re: Scheduling inside bottom-half

Jens Axboe (axboe@image.dk)
Fri, 1 Oct 1999 18:26:19 +0200


On Thu, Sep 30 1999, Linux Lists wrote:
> > my_timer_handler receives the .data as an argument, so you can
> > use the same handler for multiple timers. Remember to del_timer()
> > also!
>
> In my case, the my_timer_handler function will generate an interrupt. Do I
> need to protect the function (with save_flags/cli/restore_flags or
> spin_locks) or are kernel timer functions already protected?

I think I saw James answer this, but in any case timers do
run at interrupt time.

> Another question: can I del_timer from inside my_timer_handler?

You don't have to, it is deleted when fired. You can add_timer()
again from the handler, if you'd like.

-- 
*  Jens Axboe <axboe@image.dk>
*  Linux CD-ROM Maintainer
*  http://www.kernel.dk

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