diff options
author | Robert Schiele <rschiele@gmail.com> | 2014-09-08 09:38:52 +0200 |
---|---|---|
committer | Jens Axboe <axboe@fb.com> | 2014-09-08 08:15:58 -0600 |
commit | 838361c6cfb1319eadd59daaf9074dcdb92746e6 (patch) | |
tree | 7d9329ee8d218e8e58b7b985df2389fddad4b496 | |
parent | ce9ded7165b846598b28107ceb2864ae1ad4b652 (diff) | |
download | blktrace-838361c6cfb1319eadd59daaf9074dcdb92746e6.tar.gz |
signal condition variable at end of stop_tracers
stop_tracers modifies tp->is_done and thus must signal the condition
variable tracer_wait_unblock is waiting on to monitor tp->is_done.
Not doing so might cause the tool to deadlock if stop_tracers is
called while a tracer thread is in tracer_wait_unblock.
Signed-off-by: Robert Schiele <rschiele@gmail.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
-rw-r--r-- | blktrace.c | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -1913,6 +1913,7 @@ static void stop_tracers(void) struct tracer *tp = list_entry(p, struct tracer, head); tp->is_done = 1; } + pthread_cond_broadcast(&mt_cond); } static void del_tracers(void) |