Messages in this thread | | | Subject | Re: [PATCH 15/15] workqueue: deprecate __cancel_delayed_work() | From | Tomi Valkeinen <> | Date | Tue, 31 Jul 2012 16:05:39 +0300 |
| |
Hi,
On Fri, 2012-07-27 at 16:55 -0700, Tejun Heo wrote: > __cancel_delayed_work() is different from cancel_delayed_work() in > that it uses del_timer() instead of del_timer_sync(). This adds > confusion to already complicated flush / cancel API and given that the > only thing delayed_work->timer does is queueing the work, the > difference between cancel_delayed_work() and __cancel_delayed_work() > isn't anything material. > > Furthermore, none of the remaining users are on hot path racing > against high-frequency work item making the chance of actually waiting > for delayed_work_timer_fn() very slim. > > Use cancel_delayed_work() instead of __cancel_delayed_work() and mark > the latter deprecated.
I used __cancel_delayed_work() in drivers/video/omap2/dss/dsi.c as the cancel is done in an interrupt handler. Is it safe to use cancel_delayed_work() in atomic context? I presume not, as it uses del_timer_sync().
Tomi
[unhandled content-type:application/pgp-signature] | |