X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=src%2Fthread-utils.h;fp=src%2Fthread-utils.h;h=f75e4408769ab2be60e0b2dd6abd7a0f512a866d;hb=6551004fb19453f424337b5b7a5fed6becb3b746;hp=1eb51de25d291ae5ab62e9632e0f8e1bab9c1a83;hpb=139bffa074c7a74af92ee9c97d1e876acfc8dcd3;p=libgit2.git 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)