Re: [PATCH 03/10] workqueue: async worker destruction

Lai Jiangshan
2014-05-07T07:26:33Z

On 04/27/2014 12:08 PM, Lai Jiangshan wrote:

>
> spin_unlock_irq(&pool->lock);
> +
> + wait_event_cmd(pool->workers_unbound,
> + idr_is_empty(&pool->worker_idr),
> + mutex_unlock(&pool->manager_mutex),
> + mutex_lock(&pool->manager_mutex));
> +

How about I wrap it as wait_event_mutex()?
(like wait_event_lock_irq() in kernel and pthread_cond_wait() in userspace)

> mutex_unlock(&pool->manager_mutex);
> mutex_unlock(&pool->manager_arb);
>