summaryrefslogtreecommitdiff
path: root/src/thread-utils.h
diff options
context:
space:
mode:
authorPatrick Steinhardt <ps@pks.im>2016-06-20 17:49:47 +0200
committerPatrick Steinhardt <ps@pks.im>2016-06-20 19:49:40 +0200
commit6551004fb19453f424337b5b7a5fed6becb3b746 (patch)
tree483e91f5dacb3c3057e3cddc8e716c44f93b27f0 /src/thread-utils.h
parent139bffa074c7a74af92ee9c97d1e876acfc8dcd3 (diff)
downloadlibgit2-6551004fb19453f424337b5b7a5fed6becb3b746.tar.gz
threads: split up OS-dependent rwlock code
Diffstat (limited to 'src/thread-utils.h')
-rw-r--r--src/thread-utils.h24
1 files changed, 0 insertions, 24 deletions
diff --git a/src/thread-utils.h b/src/thread-utils.h
index 1eb51de25..f75e44087 100644
--- a/src/thread-utils.h
+++ b/src/thread-utils.h
@@ -46,30 +46,6 @@ typedef git_atomic git_atomic_ssize;
# include "unix/pthread.h"
#endif
-/* Pthread (-ish) rwlock
- *
- * This differs from normal pthreads rwlocks in two ways:
- * 1. Separate APIs for releasing read locks and write locks (as
- * opposed to the pure POSIX API which only has one unlock fn)
- * 2. You should not use recursive read locks (i.e. grabbing a read
- * lock in a thread that already holds a read lock) because the
- * Windows implementation doesn't support it
- */
-#define git_rwlock pthread_rwlock_t
-#define git_rwlock_init(a) pthread_rwlock_init(a, NULL)
-#define git_rwlock_rdlock(a) pthread_rwlock_rdlock(a)
-#define git_rwlock_rdunlock(a) pthread_rwlock_rdunlock(a)
-#define git_rwlock_wrlock(a) pthread_rwlock_wrlock(a)
-#define git_rwlock_wrunlock(a) pthread_rwlock_wrunlock(a)
-#define git_rwlock_free(a) pthread_rwlock_destroy(a)
-#define GIT_RWLOCK_STATIC_INIT PTHREAD_RWLOCK_INITIALIZER
-
-#ifndef GIT_WIN32
-#define pthread_rwlock_rdunlock pthread_rwlock_unlock
-#define pthread_rwlock_wrunlock pthread_rwlock_unlock
-#endif
-
-
GIT_INLINE(void) git_atomic_set(git_atomic *a, int val)
{
#if defined(GIT_WIN32)