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

MORITA Kazutaka morita.kazutaka at gmail.com
Sun Mar 3 14:08:04 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