summaryrefslogtreecommitdiff
path: root/src/thread-utils.h
diff options
context:
space:
mode:
authorMichael Schubert <schu@schu.io>2012-08-01 11:35:26 +0200
committerMichael Schubert <schu@schu.io>2012-10-09 21:28:31 +0200
commitfa16a6ecc4ccc02ad451703c9a5fe6680722e90a (patch)
treeaaedeecc1135404de1c0a47a7c11c6198fb0a348 /src/thread-utils.h
parent2f05339e3e39b205ff55198e35604f521cdda41e (diff)
downloadlibgit2-fa16a6ecc4ccc02ad451703c9a5fe6680722e90a.tar.gz
Enable pthread condition vars
Diffstat (limited to 'src/thread-utils.h')
-rw-r--r--src/thread-utils.h14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/thread-utils.h b/src/thread-utils.h
index a309e93d1..f0a51f28c 100644
--- a/src/thread-utils.h
+++ b/src/thread-utils.h
@@ -38,13 +38,13 @@ GIT_INLINE(void) git_atomic_set(git_atomic *a, int val)
#define git_mutex_unlock(a) pthread_mutex_unlock(a)
#define git_mutex_free(a) pthread_mutex_destroy(a)
-/* Pthreads condition vars -- disabled by now */
-#define git_cond unsigned int //pthread_cond_t
-#define git_cond_init(c, a) (void)0 //pthread_cond_init(c, a)
-#define git_cond_free(c) (void)0 //pthread_cond_destroy(c)
-#define git_cond_wait(c, l) (void)0 //pthread_cond_wait(c, l)
-#define git_cond_signal(c) (void)0 //pthread_cond_signal(c)
-#define git_cond_broadcast(c) (void)0 //pthread_cond_broadcast(c)
+/* Pthreads condition vars */
+#define git_cond pthread_cond_t
+#define git_cond_init(c) pthread_cond_init(c, NULL)
+#define git_cond_free(c) pthread_cond_destroy(c)
+#define git_cond_wait(c, l) pthread_cond_wait(c, l)
+#define git_cond_signal(c) pthread_cond_signal(c)
+#define git_cond_broadcast(c) pthread_cond_broadcast(c)
GIT_INLINE(int) git_atomic_inc(git_atomic *a)
{