[sheepdog] [PATCH v2 3/5] work: remove unused codes

MORITA Kazutaka morita.kazutaka at gmail.com
Thu Feb 28 11:46:20 CET 2013


From: MORITA Kazutaka <morita.kazutaka at lab.ntt.co.jp>

Signed-off-by: MORITA Kazutaka <morita.kazutaka at lab.ntt.co.jp>
---
 sheep/work.c |   22 ----------------------
 1 file changed, 22 deletions(-)

diff --git a/sheep/work.c b/sheep/work.c
index bc5c7c9..041aaa4 100644
--- a/sheep/work.c
+++ b/sheep/work.c
@@ -171,13 +171,8 @@ struct work_queue *init_work_queue(const char *name, bool ordered)
 
 	return &wi->q;
 destroy_threads:
-
 	wi->q.wq_state |= WQ_DEAD;
 	pthread_mutex_unlock(&wi->startup_lock);
-	pthread_join(wi->worker_thread, NULL);
-	sd_eprintf("stopped worker thread");
-
-/* destroy_cond_mutex: */
 	pthread_cond_destroy(&wi->pending_cond);
 	pthread_mutex_destroy(&wi->pending_lock);
 	pthread_mutex_destroy(&wi->startup_lock);
@@ -185,20 +180,3 @@ destroy_threads:
 
 	return NULL;
 }
-
-#ifdef COMPILE_UNUSED_CODE
-static void exit_work_queue(struct work_queue *q)
-{
-	struct worker_info *wi = container_of(q, struct worker_info, q);
-
-	q->wq_state |= WQ_DEAD;
-	pthread_cond_broadcast(&wi->pending_cond);
-
-	pthread_join(wi->worker_thread, NULL);
-
-	pthread_cond_destroy(&wi->pending_cond);
-	pthread_mutex_destroy(&wi->pending_lock);
-	pthread_mutex_destroy(&wi->startup_lock);
-	pthread_mutex_destroy(&wi->finished_lock);
-}
-#endif
-- 
1.7.9.5




More information about the sheepdog mailing list