summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVadim Kochan <vadim4j@gmail.com>2015-07-18 14:12:48 +0300
committerDaniel Borkmann <daniel@iogearbox.net>2015-07-20 09:56:58 +0200
commit9a89c1d813fbb762b801e99d6bc0801a45b7f49a (patch)
tree63d0cd72787d93bf9ed4f7e8f2479e51b49cc8d9
parent95c4582b742fd4fa58e5f14971164b941b0f730d (diff)
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 <vadim4j@gmail.com> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
-rw-r--r--locking.h2
1 files changed, 1 insertions, 1 deletions
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);
}