summaryrefslogtreecommitdiff
path: root/locking.h
diff options
context:
space:
mode:
authorVadim Kochan <vadim4j@gmail.com>2015-07-18 14:12:49 +0300
committerDaniel Borkmann <daniel@iogearbox.net>2015-07-20 09:58:41 +0200
commitbcc10fdc239d2fe7073637df4febfe60463b4b46 (patch)
treedf3d5183e7a84eb72d769768317dedd46fb0d363 /locking.h
parent9a89c1d813fbb762b801e99d6bc0801a45b7f49a (diff)
Revert "flowtop: Don't init screen until collector is ready"
Follow-up of commit 9a89c1d813fb ("Revert "flowtop: Fix hanging while waiting for collector"") which both address the clean up in the panic handler. This reverts commit 451275470106024f106a310a5af050b3ca046a4f. Signed-off-by: Vadim Kochan <vadim4j@gmail.com> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Diffstat (limited to 'locking.h')
-rw-r--r--locking.h31
1 files changed, 0 insertions, 31 deletions
diff --git a/locking.h b/locking.h
index 2cb93d1..ddc4027 100644
--- a/locking.h
+++ b/locking.h
@@ -17,11 +17,6 @@ struct rwlock {
pthread_rwlock_t lock;
};
-struct condlock {
- pthread_mutex_t lock;
- pthread_cond_t cond;
-};
-
static inline int spinlock_init(struct spinlock *l)
{
return -pthread_spin_init(&l->lock, 0);
@@ -93,30 +88,4 @@ static inline void rwlock_unlock(struct rwlock *l)
pthread_rwlock_unlock(&l->lock);
}
-static inline void condlock_init(struct condlock *c)
-{
- pthread_mutex_init(&c->lock, NULL);
- pthread_cond_init(&c->cond, NULL);
-}
-
-static inline void condlock_signal(struct condlock *c)
-{
- pthread_mutex_lock(&c->lock);
- pthread_cond_signal(&c->cond);
- pthread_mutex_unlock(&c->lock);
-}
-
-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);
-}
-
-static inline void condlock_destroy(struct condlock *c)
-{
- pthread_mutex_destroy(&c->lock);
- pthread_cond_destroy(&c->cond);
-}
-
#endif /* LOCKING_H */