lkml.org 
[lkml]   [2012]   [Jul]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 15/15] workqueue: deprecate __cancel_delayed_work()
From
Date
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]
\
 
 \ /
  Last update: 2012-07-31 15:41    [W:0.123 / U:15.264 seconds]
©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site