summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRussell Belfer <rb@github.com>2013-08-27 12:08:55 -0700
committerRussell Belfer <rb@github.com>2013-08-27 12:08:55 -0700
commitf087bc245e9f3934d43c49f4034ee9b5638884dd (patch)
tree8cd8b0647514db91cf0a29b280d0493cf3a7ffc2
parent2f368a661c55b49a8f15905c221f9e76935bedd0 (diff)
downloadlibgit2-f087bc245e9f3934d43c49f4034ee9b5638884dd.tar.gz
Convert to our own SRWLOCK type on Win32
-rw-r--r--src/win32/mingw-compat.h2
-rw-r--r--src/win32/pthread.c2
-rw-r--r--src/win32/pthread.h4
3 files changed, 4 insertions, 4 deletions
diff --git a/src/win32/mingw-compat.h b/src/win32/mingw-compat.h
index b06dda209..fe0abfb54 100644
--- a/src/win32/mingw-compat.h
+++ b/src/win32/mingw-compat.h
@@ -24,8 +24,6 @@ GIT_INLINE(size_t) p_strnlen(const char *s, size_t maxlen) {
return end ? (size_t)(end - s) : maxlen;
}
-typedef struct { void *Ptr; } SRWLOCK;
-
#endif
#endif /* INCLUDE_mingw_compat__ */
diff --git a/src/win32/pthread.c b/src/win32/pthread.c
index 8775f632a..d50ace695 100644
--- a/src/win32/pthread.c
+++ b/src/win32/pthread.c
@@ -146,7 +146,7 @@ int pthread_num_processors_np(void)
static HINSTANCE win32_kernel32_dll;
-typedef void (WINAPI *win32_srwlock_fn)(SRWLOCK *);
+typedef void (WINAPI *win32_srwlock_fn)(GIT_SRWLOCK *);
static win32_srwlock_fn win32_srwlock_initialize;
static win32_srwlock_fn win32_srwlock_acquire_shared;
diff --git a/src/win32/pthread.h b/src/win32/pthread.h
index 679ebed23..2ba2ca552 100644
--- a/src/win32/pthread.h
+++ b/src/win32/pthread.h
@@ -25,9 +25,11 @@ typedef CRITICAL_SECTION pthread_mutex_t;
typedef HANDLE pthread_t;
typedef HANDLE pthread_cond_t;
+typedef struct { void *Ptr; } GIT_SRWLOCK;
+
typedef struct {
union {
- SRWLOCK srwl;
+ GIT_SRWLOCK srwl;
CRITICAL_SECTION csec;
} native;
} pthread_rwlock_t;