mirror of
https://git.proxmox.com/git/libgit2
synced 2025-05-06 09:41:04 +00:00
Merge pull request #177 from kellypleahy/topic/fix-delete-mutex
Fix bug in the way pthead_mutex_t was being destroyed in win32.
This commit is contained in:
commit
f26f2b80a7
@ -48,16 +48,15 @@ int pthread_join(pthread_t thread, void **value_ptr)
|
|||||||
int pthread_mutex_init(pthread_mutex_t *GIT_RESTRICT mutex,
|
int pthread_mutex_init(pthread_mutex_t *GIT_RESTRICT mutex,
|
||||||
const pthread_mutexattr_t *GIT_RESTRICT GIT_UNUSED(mutexattr))
|
const pthread_mutexattr_t *GIT_RESTRICT GIT_UNUSED(mutexattr))
|
||||||
{
|
{
|
||||||
GIT_UNUSED_ARG(mutexattr);
|
GIT_UNUSED_ARG(mutexattr);
|
||||||
InitializeCriticalSection(mutex);
|
InitializeCriticalSection(mutex);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int pthread_mutex_destroy(pthread_mutex_t *mutex)
|
int pthread_mutex_destroy(pthread_mutex_t *mutex)
|
||||||
{
|
{
|
||||||
int ret;
|
DeleteCriticalSection(mutex);
|
||||||
ret = CloseHandle(mutex);
|
return 0;
|
||||||
return -(!ret);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int pthread_mutex_lock(pthread_mutex_t *mutex)
|
int pthread_mutex_lock(pthread_mutex_t *mutex)
|
||||||
|
Loading…
Reference in New Issue
Block a user