mirror of
https://git.proxmox.com/git/libgit2
synced 2025-05-05 15:33:51 +00:00
Convert to our own SRWLOCK type on Win32
This commit is contained in:
parent
2f368a661c
commit
f087bc245e
@ -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__ */
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user