diff options
author | rpj <rpj> | 2001-06-05 07:48:19 +0000 |
---|---|---|
committer | rpj <rpj> | 2001-06-05 07:48:19 +0000 |
commit | b77a92d5dbb0147c8dd872c0be8f4fe73a750490 (patch) | |
tree | 69e6c711d510a6c505cb6b26dceab6588f392403 /nonportable.c | |
parent | 1451ff5c2051b5cadf84bd8e965dcda757101b13 (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 'nonportable.c')
-rw-r--r-- | nonportable.c | 68 |
1 files changed, 2 insertions, 66 deletions
diff --git a/nonportable.c b/nonportable.c index e6b6995..404d831 100644 --- a/nonportable.c +++ b/nonportable.c @@ -34,6 +34,7 @@ int pthread_mutexattr_setkind_np(pthread_mutexattr_t * attr, int kind) return pthread_mutexattr_settype( attr, kind ); } + /* * pthread_mutexattr_getkind_np() */ @@ -44,71 +45,6 @@ int pthread_mutexattr_getkind_np(pthread_mutexattr_t * attr, int *kind) /* - * pthread_mutex_setdefaultkind_np -- - * - * Sets the default type to be given to all - * POSIX mutexes initialised after the function - * is called. Any of the following type values - * can be made the default type: - * - * PTHREAD_MUTEX_NORMAL - * PTHREAD_MUTEX_ERRORCHECK - * PTHREAD_MUTEX_RECURSIVE - * PTHREAD_MUTEX_DEFAULT - * - * Any mutex initialised with kind PTHREAD_MUTEX_DEFAULT - * will be set to the mapped type instead. Previously - * initialised mutexes are not changed. - * - * When set to PTHREAD_MUTEX_DEFAULT (the initial - * value), mutexes will behave as for the - * PTHREAD_MUTEX_RECURSIVE kind. - * - */ -int -pthread_mutex_setdefaultkind_np (int kind ) -{ - int result = 0; - - switch (kind) - { - case PTHREAD_MUTEX_FAST_NP: - case PTHREAD_MUTEX_RECURSIVE_NP: - case PTHREAD_MUTEX_ERRORCHECK_NP: - ptw32_mutex_default_kind = kind; - break; - default: - result = EINVAL; - } - - return result; -} - -/* - * pthread_mutex_getdefaultkind_np -- - * - * Return the default kind for all mutexes - * - */ -int -pthread_mutex_getdefaultkind_np (int *kind) -{ - int result = 0; - - if (kind != NULL) - { - *kind = ptw32_mutex_default_kind; - } - - else - { - result = EINVAL; - } - - return result; -} - -/* * pthread_getw32threadhandle_np() * * Returns the win32 thread handle that the POSIX @@ -262,4 +198,4 @@ pthread_win32_thread_detach_np () } return TRUE; -}
\ No newline at end of file +} |