From 9a89c1d813fbb762b801e99d6bc0801a45b7f49a Mon Sep 17 00:00:00 2001 From: Vadim Kochan Date: Sat, 18 Jul 2015 14:12:48 +0300 Subject: Revert "flowtop: Fix hanging while waiting for collector" Vadim says: "This series reverts unnecesseary cond lock when presenter waits for collector to finish its initializing part before do screen initializing, it was added only to do not panic collector when screen is initialized with ncurses so after this shell will be colored." Now screen is cleaned up in panic handler so cond lock is not needed anymore. This reverts commit 3beaa23d4d33b51a392b56f110c8773151ac19cc. Signed-off-by: Vadim Kochan Signed-off-by: Daniel Borkmann --- locking.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/locking.h b/locking.h index 6c8b875..2cb93d1 100644 --- a/locking.h +++ b/locking.h @@ -97,7 +97,6 @@ static inline void condlock_init(struct condlock *c) { pthread_mutex_init(&c->lock, NULL); pthread_cond_init(&c->cond, NULL); - pthread_mutex_lock(&c->lock); } static inline void condlock_signal(struct condlock *c) @@ -109,6 +108,7 @@ static inline void condlock_signal(struct condlock *c) static inline void condlock_wait(struct condlock *c) { + pthread_mutex_lock(&c->lock); pthread_cond_wait(&c->cond, &c->lock); pthread_mutex_unlock(&c->lock); } -- cgit v1.2.3-54-g00ecf