Messages in this thread | | | Date | Mon, 3 May 2004 21:15:40 -0700 | From | Andrew Morton <> | Subject | Re: workqueue and pending |
| |
Benjamin Herrenschmidt <benh@kernel.crashing.org> wrote: > > It's probably still good to precise explicitely in the comments > that upon return of cancel_delayed_work(), the work queue might > still be pending and that a flush and whoever called this may > still need a flush_scheduled_work() or flush_workqueue() (provided > it's running in a context where that can sleep)
That function was originally written by a comment fetishist.
/* * Kill off a pending schedule_delayed_work(). Note that the work callback * function may still be running on return from cancel_delayed_work(). Run * flush_scheduled_work() to wait on it. */ static inline int cancel_delayed_work(struct work_struct *work) { int ret;
ret = del_timer_sync(&work->timer); if (ret) clear_bit(0, &work->pending); return ret; }
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |