netdev
[Top] [All Lists]

Re: tx_timeout and timer serialisation

To: andrewm@xxxxxxxxxx (Andrew Morton)
Subject: Re: tx_timeout and timer serialisation
From: kuznet@xxxxxxxxxxxxx
Date: Thu, 11 May 2000 17:09:29 +0400 (MSK DST)
Cc: netdev@xxxxxxxxxxx
In-reply-to: <391A19F6.5C72A6E0@xxxxxxxxxx> from "Andrew Morton" at May 11, 0 02:24:54 am
Sender: owner-netdev@xxxxxxxxxxx
Hello!

> Why does the handler have to call timer_exit() at all?
> 
> Could we not clear timer->running in run_timer_list()?  That would
> certainly protect us from the problem you identify...

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.
In this case we have to use refcounts external to timer
to avoid races.

Actually, existing *_timer primitives are very inconvenient.
And I did not find any good way to improve them. Essentially,
del_timer_sync(), timer->running and mod_timer() returning
value are all that I was able to do.

Alexey

<Prev in Thread] Current Thread [Next in Thread>