[ofw] [PATCH] complib/user: fix timer race conditions

Hefty, Sean sean.hefty at intel.com
Fri Jun 25 08:12:27 PDT 2010


> 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.

- Sean



More information about the ofw mailing list