summaryrefslogtreecommitdiff
path: root/src/win32/pthread.c
diff options
context:
space:
mode:
authorCarlos Martín Nieto <cmn@elego.de>2011-05-17 12:12:59 +0200
committerCarlos Martín Nieto <cmn@elego.de>2011-05-17 12:12:59 +0200
commit94711cad3b83445dfcf45a6e0b29b045e06a29f6 (patch)
treec0b5560d53aac94756a4d9759fdcf25f1582c40f /src/win32/pthread.c
parentc0335005495c1b49986d19031557f9df6bf49922 (diff)
parent335d6c998041f7c44dce48d3bb087c52136d970f (diff)
downloadlibgit2-94711cad3b83445dfcf45a6e0b29b045e06a29f6.tar.gz
Merge upstream/development
Diffstat (limited to 'src/win32/pthread.c')
-rw-r--r--src/win32/pthread.c7
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)