In message <39654DE5.389BEFB@uow.edu.au> you write:
> > sync_timers() -> finish all timers currently running (this can be
> > trivially implemented as spin_lock_wait(&global_bh_lock).
>
> Where does the requirement for sync_timers() appear? How would it be used?
module unload, where module count is decremented by timer; timer must
be finished. Also: `if (!del_timer(timer)) sync_timers();' ==
del_timer_sync() for self-destructing timers.
> It's a pretty meaningless function unless called under
> __global_cli(), or with timerlist_lock or global_bh_lock held.
> Unless you're doing something fancy, which I suspect is the case...
>From kernel/softirq.c:
/* BHs are serialized by spinlock global_bh_lock.
It is still possible to make synchronize_bh() as
spin_unlock_wait(&global_bh_lock). This operation is not used
by kernel now, so that this lock is not made private only
due to wait_on_irq().
It can be removed only after auditing all the BHs.
*/
Sure, this is overkill for merely syncing timers, but it puts the API
in place for 2.5.
Rusty.
-- Hacking time.- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/
This archive was generated by hypermail 2b29 : Fri Jul 07 2000 - 21:00:20 EST