From: Liu Yuan <tailai.ly at taobao.com> We do nothing while we hold the mutex, then we don't need it. Signed-off-by: Liu Yuan <tailai.ly at taobao.com> --- sheep/work.c | 4 ---- 1 files changed, 0 insertions(+), 4 deletions(-) diff --git a/sheep/work.c b/sheep/work.c index 789272e..de3f500 100644 --- a/sheep/work.c +++ b/sheep/work.c @@ -194,10 +194,6 @@ static void *worker_routine(void *arg) struct work *work; eventfd_t value = 1; - pthread_mutex_lock(&wi->startup_lock); - /* started this thread */ - pthread_mutex_unlock(&wi->startup_lock); - while (!(wi->q.wq_state & WQ_DEAD)) { pthread_mutex_lock(&wi->pending_lock); -- 1.7.8.2 |