Messages in this thread | | | Date | Thu, 27 Oct 2022 17:15:55 -0400 | From | Steven Rostedt <> | Subject | Re: [RFC][PATCH v2 19/31] timers: net: Use del_timer_shutdown() before freeing timer |
| |
On Thu, 27 Oct 2022 17:07:20 -0400 Steven Rostedt <rostedt@goodmis.org> wrote:
> > And maybe that function can also disallow any future re-arming even > > for the case where the timer couldn't be actively removed.
The naming of the functions will depend on this.
If the async version always shuts down the timer, then we should have the interface be:
del_timer_shutdown() <- async
del_timer_shutdown_sync <- sync
As it would match the del_timer() and del_timer_sync() semantics.
If shutdown only happens if the timer is removed, then I believe the current approach of del_timer_shutdown() being synchronous and del_timer_try_shutdown() being async is the way to go, as it follows more the semantics of mutex_lock() and mutex_trylock().
-- Steve
| |