diff options
| author | Vicent Martà <tanoku@gmail.com> | 2011-05-08 13:56:09 -0700 |
|---|---|---|
| committer | Vicent Martà <tanoku@gmail.com> | 2011-05-08 13:56:09 -0700 |
| commit | f26f2b80a7af60d2f81957d0b4933c932793d3f8 (patch) | |
| tree | b14cd952b12e3150d02956cb9f0ab3d621df637d | |
| parent | cd7ad3c6fba1e4d0ff0815dcec423c0217ba7906 (diff) | |
| parent | 16a5c3046595284c1f2f8b9eb8621d76239e4b61 (diff) | |
| download | libgit2-f26f2b80a7af60d2f81957d0b4933c932793d3f8.tar.gz | |
Merge pull request #177 from kellypleahy/topic/fix-delete-mutex
Fix bug in the way pthead_mutex_t was being destroyed in win32.
| -rw-r--r-- | src/win32/pthread.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/win32/pthread.c b/src/win32/pthread.c index f47364a76..7e17b6bdf 100644 --- a/src/win32/pthread.c +++ b/src/win32/pthread.c @@ -48,16 +48,15 @@ int pthread_join(pthread_t thread, void **value_ptr) int pthread_mutex_init(pthread_mutex_t *GIT_RESTRICT mutex, const pthread_mutexattr_t *GIT_RESTRICT GIT_UNUSED(mutexattr)) { - GIT_UNUSED_ARG(mutexattr); + GIT_UNUSED_ARG(mutexattr); InitializeCriticalSection(mutex); return 0; } int pthread_mutex_destroy(pthread_mutex_t *mutex) { - int ret; - ret = CloseHandle(mutex); - return -(!ret); + DeleteCriticalSection(mutex); + return 0; } int pthread_mutex_lock(pthread_mutex_t *mutex) |
