[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20140520142345.GB2804@htj.dyndns.org>
Date: Tue, 20 May 2014 10:23:45 -0400
From: Tejun Heo <tj@...nel.org>
To: Lai Jiangshan <laijs@...fujitsu.com>
Cc: linux-kernel@...r.kernel.org
Subject: Re: [PATCH V3 03/10] workqueue: async worker destruction
On Tue, May 20, 2014 at 05:46:29PM +0800, Lai Jiangshan wrote:
...
> +static void worker_detach_from_pool(struct worker *worker,
> + struct worker_pool *pool)
> +{
> + struct completion *detach_completion = NULL;
> +
> + mutex_lock(&pool->manager_mutex);
> + idr_remove(&pool->worker_idr, worker->id);
> + if (idr_is_empty(&pool->worker_idr))
> + detach_completion = pool->detach_completion;
> + mutex_unlock(&pool->manager_mutex);
> +
> + if (detach_completion)
> + complete(detach_completion);
Also, please add comment explaining what's going on here.
--
tejun
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists