Take the 2-minute tour ×

I'm using a periodic timer where the handler function rearms the timer when it is done using mod_timer. When I kill the timer using del_timer_sync() and the handler is running, does this mean that the timer gets re-armed and isn't deleted, or does the function somehow kill the timer? In the case that it doesn't kill the timer, is there a way to know through the return value if the function had to wait for the handler to finish? in that case I can call del_timer_sync() in a loop until the return is not that value. The kernel version I am working with is

share|improve this question
add comment

1 Answer

so looking at how the function is defined in the kernel for linux version, I can see that del_timer_sync() will make sure that the timer is killed and will not be re armed.

share|improve this answer
add comment

Your Answer


