[ofw] [PATCH] complib/user: fix timer race conditions
Fab Tillier
ftillier at microsoft.com
Fri Jun 25 09:27:19 PDT 2010
Hefty, Sean wrote on Fri, 25 Jun 2010 at 08:12:27
>> Why the per-timer timer queue? The only time you take advantage of it
>> is in cl_timer_destroy, but at that point the timer should no longer be
>> in the process of being queued. You could just as easily call
>> __clear_timer_handle, and then do a blocking cancel of the timer.
>
> DeleteTimerQueueEx cancels all outstanding timers and waits for them to
> complete. This allows us to call DeleteTimerQueueTimer in a non-
> blocking fashion from start/trim and not worry that we stop tracking
> the timer. Cleanup happens appropriately.
>
> Calling DeleteTimerQueueTimer in a blocking fashion from destroy only
> guarantees that the last timer we created has been canceled. However,
> previous timers may still be lingering.
Ok, that makes sense, looks good to me then. Does it work?
-Fab
More information about the ofw
mailing list