Whoops, this post from Alexy makes it quite clear why I can't do that:
http://www.wcug.wwu.edu/lists/netdev/200005/msg00050.html
Timers are self-destructable as rule. See? Normal usage
for timer is to have it allocated inside an object and
timer event detroys the object together with timer.
I did a quick scan through timer usage, and sure enough, I found
self-destructive behaviour as Alexy describes, for example, in
ax25_std_heartbeat_expiry. Your suggestion is good and simple, but
requires every timer_list->function to be changed, a couple of hundred
places to check.
It would be nice to have a nice easy transition instead of a
jump-off-the-cliff and change all usage approach. Hmm, a hack is
coming... I'll add a new, improved function field beside the old one,
call it ->timer_event, and it can force rescheduling as you suggested.
If ->timer_event is non-null it gets called instead of ->function, and
the timer may be requeued. For good measure, I'll leave my ->period
field in there because it just makes sense. Then I can write a generic
->timer_event that just returns the ->period.
/me: hack, hack, hack
-- Daniel - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org Please read the FAQ at http://www.tux.org/lkml/