Blame SOURCES/blktrace-1.0.5-signal-condition.patch

005c25
commit 838361c6cfb1319eadd59daaf9074dcdb92746e6
005c25
Author: Robert Schiele <rschiele@gmail.com>
005c25
Date:   Mon Sep 8 09:38:52 2014 +0200
005c25
005c25
    signal condition variable at end of stop_tracers
005c25
    
005c25
    stop_tracers modifies tp->is_done and thus must signal the condition
005c25
    variable tracer_wait_unblock is waiting on to monitor tp->is_done.
005c25
    Not doing so might cause the tool to deadlock if stop_tracers is
005c25
    called while a tracer thread is in tracer_wait_unblock.
005c25
    
005c25
    Signed-off-by: Robert Schiele <rschiele@gmail.com>
005c25
    Signed-off-by: Jens Axboe <axboe@fb.com>
005c25
005c25
diff --git a/blktrace.c b/blktrace.c
005c25
index 7e64c94..3c8fb4c 100644
005c25
--- a/blktrace.c
005c25
+++ b/blktrace.c
005c25
@@ -1913,6 +1913,7 @@ static void stop_tracers(void)
005c25
 		struct tracer *tp = list_entry(p, struct tracer, head);
005c25
 		tp->is_done = 1;
005c25
 	}
005c25
+	pthread_cond_broadcast(&mt_cond);
005c25
 }
005c25
 
005c25
 static void del_tracers(void)