Skip to contentSkip to conversation

proper method of deleting recurring timer?

DISCUSSION Tobias DiPasquale 1 participant 1 message Sep 21, 2004 netfilter

lore
Share & tools
lore
#0 lore raw

Hi all,

I've seen a number of different recommendations for the proper method of deleting a recurring timer. I am wondering what the actual proper way is and I figured that this list is the place to find that out. I have a timer that recurs while a module is loaded every x seconds until the module is unloaded. What is the proper way to remove said timer upon module unload?

Currently, I'm doing this:

[...]
del_timer_sync( &timer);
if (timer_pending( &timer))

        del_timer( &timer);

[...]

The timer is installed and started off during the module init() function. Thanks in advance!

Signature · 2 lines
[ Tobias DiPasquale ]
0x636f6465736c696e67657240676d61696c2e636f6d