summaryrefslogtreecommitdiff
path: root/mutex.c
diff options
context:
space:
mode:
authorrpj <rpj>2001-06-05 07:48:19 +0000
committerrpj <rpj>2001-06-05 07:48:19 +0000
commitb77a92d5dbb0147c8dd872c0be8f4fe73a750490 (patch)
tree69e6c711d510a6c505cb6b26dceab6588f392403 /mutex.c
parent1451ff5c2051b5cadf84bd8e965dcda757101b13 (diff)
* nonportable.c (pthread_mutex_setdefaultkind_np):
Remove - should not have been included in the first place. (pthread_mutex_getdefaultkind_np): Likewise. * global.c (ptw32_mutex_default_kind): Likewise. * mutex.c (pthread_mutex_init): Remove use of ptw32_mutex_default_kind. * pthread.h (pthread_mutex_setdefaultkind_np): Likewise. (pthread_mutex_getdefaultkind_np): Likewise. * pthread.def (pthread_mutexattr_setkind_np): Added. (pthread_mutexattr_getkind_np): Likewise. * README: Many changes that should have gone in before the last snapshot. * README.NONPORTABLE: New - referred to by ANNOUNCE but never created; documents the non-portable routines included in the library - moved from README with new routines added. * ANNOUNCE (pthread_mutexattr_setkind_np): Added to compliance list. (pthread_mutexattr_getkind_np): Likewise.
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 );