Revert "workqueue: add workqueue_empty() api"

This reverts commit bccb069835ef880e437c68a7fed9529c2549605f.

Since the workqueue code deletes the work before executing it,
checking for no work item being currently queued to the workqueue
is not sufficient to guarantee that all the works have finished
execution. Hence, we have moved to using a counter based solution
and so this change is no longer required.

Signed-off-by: Pratik Patel <pratikp@codeaurora.org>
This commit is contained in:
Pratik Patel 2011-07-23 11:21:40 -07:00 committed by Bryan Huntsman
parent 529461b70c
commit cfca519f00
2 changed files with 0 additions and 28 deletions

View File

@ -346,8 +346,6 @@ alloc_ordered_workqueue(const char *name, unsigned int flags)
extern void destroy_workqueue(struct workqueue_struct *wq);
extern bool workqueue_empty(struct workqueue_struct *wq);
extern int queue_work(struct workqueue_struct *wq, struct work_struct *work);
extern int queue_work_on(int cpu, struct workqueue_struct *wq,
struct work_struct *work);

View File

@ -3068,32 +3068,6 @@ reflush:
}
EXPORT_SYMBOL_GPL(destroy_workqueue);
/**
* workqueue_empty - test whether a workqueue is empty
* @wq: target workqueue
*
* Test whether @wq's cpu workqueue(s) are empty.
*
* Returns: false - workqueue is not empty
* true - workqueue is empty
*/
bool workqueue_empty(struct workqueue_struct *wq)
{
int cpu;
for_each_cwq_cpu(cpu, wq) {
struct cpu_workqueue_struct *cwq = get_cwq(cpu, wq);
if (!cwq->nr_active && list_empty(&cwq->delayed_works))
continue;
return false;
}
return true;
}
EXPORT_SYMBOL_GPL(workqueue_empty);
/**
* workqueue_set_max_active - adjust max_active of a workqueue
* @wq: target workqueue