summaryrefslogtreecommitdiff
path: root/src/thread-utils.h
diff options
context:
space:
mode:
authorPatrick Steinhardt <ps@pks.im>2016-06-20 17:07:14 +0200
committerPatrick Steinhardt <ps@pks.im>2016-06-20 19:34:51 +0200
commit1c13540510c054ca0f046cbadcfa72f01f6ace57 (patch)
treef51949062abe9b02695aa9b9c4c9786365b1d1ee /src/thread-utils.h
parentfaebc1c6eccacd9659d21f848a9e2be55de671c7 (diff)
downloadlibgit2-1c13540510c054ca0f046cbadcfa72f01f6ace57.tar.gz
threads: split up OS-dependent mutex code
Diffstat (limited to 'src/thread-utils.h')
-rw-r--r--src/thread-utils.h11
1 files changed, 3 insertions, 8 deletions
diff --git a/src/thread-utils.h b/src/thread-utils.h
index 11c026f33..29b5d1eee 100644
--- a/src/thread-utils.h
+++ b/src/thread-utils.h
@@ -40,17 +40,12 @@ typedef git_atomic git_atomic_ssize;
#ifdef GIT_THREADS
-#if !defined(GIT_WIN32)
+#ifdef GIT_WIN32
+# include "win32/pthread.h"
+#else
# include "unix/pthread.h"
#endif
-/* Pthreads Mutex */
-#define git_mutex pthread_mutex_t
-#define git_mutex_init(a) pthread_mutex_init(a, NULL)
-#define git_mutex_lock(a) pthread_mutex_lock(a)
-#define git_mutex_unlock(a) pthread_mutex_unlock(a)
-#define git_mutex_free(a) pthread_mutex_destroy(a)
-
/* Pthreads condition vars */
#define git_cond pthread_cond_t
#define git_cond_init(c) pthread_cond_init(c, NULL)