summaryrefslogtreecommitdiff
path: root/src/win32/pthread.c
diff options
context:
space:
mode:
authorJakob Pfender <jpfender@elegosoft.com>2011-05-17 15:31:05 +0200
committerJakob Pfender <jpfender@elegosoft.com>2011-05-17 15:31:05 +0200
commit050e8877dda969b62f47a180b865a4447785e9c7 (patch)
tree42ba240edc5f0c0f49e7effe7f8881df2fdca775 /src/win32/pthread.c
parente3c7786b22b385d7ec5049c5315c74bd37182e8c (diff)
parentc9662061f25ea51f39018a278b98c9a9b4410e84 (diff)
downloadlibgit2-050e8877dda969b62f47a180b865a4447785e9c7.tar.gz
Merge branch 'development' into unmerged
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)