From b77a92d5dbb0147c8dd872c0be8f4fe73a750490 Mon Sep 17 00:00:00 2001 From: rpj Date: Tue, 5 Jun 2001 07:48:19 +0000 Subject: * 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. --- nonportable.c | 68 ++--------------------------------------------------------- 1 file changed, 2 insertions(+), 66 deletions(-) (limited to 'nonportable.c') 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() */ @@ -43,71 +44,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() * @@ -262,4 +198,4 @@ pthread_win32_thread_detach_np () } return TRUE; -} \ No newline at end of file +} -- cgit v1.2.3