diff options
author | Luke Shumaker <lukeshu@sbcglobal.net> | 2016-03-11 19:34:18 -0500 |
---|---|---|
committer | Luke Shumaker <lukeshu@sbcglobal.net> | 2016-03-11 19:34:18 -0500 |
commit | a0a8aaf5170eab149ee0fed4d7846e0df856a2e4 (patch) | |
tree | 8e301f0c0279bdd5b592f1c63004b650fab3470f /wg.h | |
parent | 77f1df1a250d958317c930e6f3a36edf42f11d09 (diff) |
split into separate executables
Diffstat (limited to 'wg.h')
-rw-r--r-- | wg.h | 19 |
1 files changed, 0 insertions, 19 deletions
@@ -1,19 +0,0 @@ -#pragma once - -#include <pthread.h> - -/* Thread management tools modeled on https://golang.org/pkg/sync/#WaitGroup */ - -/* pthread_cond_t is overly complicated. Just use a self-pipe. */ - -struct wg { - int count; - pthread_mutex_t lock; - int fd_wait; - int fd_signal; -}; - -void wg_init(struct wg *); -void wg_add(struct wg *, unsigned int); -void wg_sub(struct wg *, unsigned int); -void wg_wait(struct wg*); |