summaryrefslogtreecommitdiff
path: root/mutex.c
diff options
context:
space:
mode:
Diffstat (limited to 'mutex.c')
-rw-r--r--mutex.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/mutex.c b/mutex.c
index 086c0bc..5e01536 100644
--- a/mutex.c
+++ b/mutex.c
@@ -130,7 +130,9 @@ pthread_mutex_init(pthread_mutex_t *mutex, const pthread_mutexattr_t *attr)
mx->lock_idx = PTW32_MUTEX_LOCK_IDX_INIT;
mx->recursive_count = 0;
- mx->kind = attr == NULL || *attr == NULL ? ptw32_mutex_default_kind : (*attr)->kind;
+ mx->kind = (attr == NULL || *attr == NULL
+ ? PTHREAD_MUTEX_DEFAULT
+ : (*attr)->kind);
mx->ownerThread = NULL;
InitializeCriticalSection( &mx->try_lock_cs );
mx->wait_sema = CreateSemaphore( NULL, 0, 1, NULL );