diff options
Diffstat (limited to 'src/win32/pthread.c')
| -rw-r--r-- | src/win32/pthread.c | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/src/win32/pthread.c b/src/win32/pthread.c index 2f263b3e0..41cb7a4c0 100644 --- a/src/win32/pthread.c +++ b/src/win32/pthread.c @@ -142,3 +142,41 @@ int pthread_num_processors_np(void) return n ? n : 1; } +int pthread_rwlock_init( + pthread_rwlock_t *GIT_RESTRICT lock, + const pthread_rwlockattr_t *GIT_RESTRICT attr) +{ + (void)attr; + InitializeSRWLock(lock); + return 0; +} + +int pthread_rwlock_rdlock(pthread_rwlock_t *lock) +{ + AcquireSRWLockShared(lock); + return 0; +} + +int pthread_rwlock_rdunlock(pthread_rwlock_t *lock) +{ + ReleaseSRWLockShared(lock); + return 0; +} + +int pthread_rwlock_wrlock(pthread_rwlock_t *lock) +{ + AcquireSRWLockExclusive(lock); + return 0; +} + +int pthread_rwlock_wrunlock(pthread_rwlock_t *lock) +{ + ReleaseSRWLockExclusive(lock); + return 0; +} + +int pthread_rwlock_destroy(pthread_rwlock_t *lock) +{ + (void)lock; + return 0; +} |
