From 771465fed0cf50ee2dd790723245fc091699c324 Mon Sep 17 00:00:00 2001 From: rpj Date: Mon, 17 May 2004 01:38:02 +0000 Subject: re-indentation, bug fixes, hooks for pre-emptive async cancelation --- pthread_mutexattr_settype.c | 79 ++++++++++++++++++++++----------------------- 1 file changed, 39 insertions(+), 40 deletions(-) (limited to 'pthread_mutexattr_settype.c') diff --git a/pthread_mutexattr_settype.c b/pthread_mutexattr_settype.c index 1ebecec..942a199 100644 --- a/pthread_mutexattr_settype.c +++ b/pthread_mutexattr_settype.c @@ -39,8 +39,7 @@ int -pthread_mutexattr_settype (pthread_mutexattr_t * attr, - int kind) +pthread_mutexattr_settype (pthread_mutexattr_t * attr, int kind) /* * ------------------------------------------------------ * @@ -52,18 +51,18 @@ pthread_mutexattr_settype (pthread_mutexattr_t * attr, * * PARAMETERS * attr - * pointer to an instance of pthread_mutexattr_t + * pointer to an instance of pthread_mutexattr_t * * type - * must be one of: + * must be one of: * - * PTHREAD_MUTEX_DEFAULT + * PTHREAD_MUTEX_DEFAULT * - * PTHREAD_MUTEX_NORMAL + * PTHREAD_MUTEX_NORMAL * - * PTHREAD_MUTEX_ERRORCHECK + * PTHREAD_MUTEX_ERRORCHECK * - * PTHREAD_MUTEX_RECURSIVE + * PTHREAD_MUTEX_RECURSIVE * * DESCRIPTION * The pthread_mutexattr_settype() and @@ -76,45 +75,45 @@ pthread_mutexattr_settype (pthread_mutexattr_t * attr, * mutex attributes. Valid mutex types include: * * PTHREAD_MUTEX_NORMAL - * This type of mutex does not detect deadlock. A - * thread attempting to relock this mutex without - * first unlocking it will deadlock. Attempting to - * unlock a mutex locked by a different thread - * results in undefined behavior. Attempting to - * unlock an unlocked mutex results in undefined - * behavior. + * This type of mutex does not detect deadlock. A + * thread attempting to relock this mutex without + * first unlocking it will deadlock. Attempting to + * unlock a mutex locked by a different thread + * results in undefined behavior. Attempting to + * unlock an unlocked mutex results in undefined + * behavior. * * PTHREAD_MUTEX_ERRORCHECK - * This type of mutex provides error checking. A - * thread attempting to relock this mutex without - * first unlocking it will return with an error. A - * thread attempting to unlock a mutex which another - * thread has locked will return with an error. A - * thread attempting to unlock an unlocked mutex will - * return with an error. + * This type of mutex provides error checking. A + * thread attempting to relock this mutex without + * first unlocking it will return with an error. A + * thread attempting to unlock a mutex which another + * thread has locked will return with an error. A + * thread attempting to unlock an unlocked mutex will + * return with an error. * * PTHREAD_MUTEX_DEFAULT - * Same as PTHREAD_MUTEX_NORMAL. + * Same as PTHREAD_MUTEX_NORMAL. * * PTHREAD_MUTEX_RECURSIVE - * A thread attempting to relock this mutex without - * first unlocking it will succeed in locking the - * mutex. The relocking deadlock which can occur with - * mutexes of type PTHREAD_MUTEX_NORMAL cannot occur - * with this type of mutex. Multiple locks of this - * mutex require the same number of unlocks to - * release the mutex before another thread can - * acquire the mutex. A thread attempting to unlock a - * mutex which another thread has locked will return - * with an error. A thread attempting to unlock an - * unlocked mutex will return with an error. This - * type of mutex is only supported for mutexes whose - * process shared attribute is - * PTHREAD_PROCESS_PRIVATE. + * A thread attempting to relock this mutex without + * first unlocking it will succeed in locking the + * mutex. The relocking deadlock which can occur with + * mutexes of type PTHREAD_MUTEX_NORMAL cannot occur + * with this type of mutex. Multiple locks of this + * mutex require the same number of unlocks to + * release the mutex before another thread can + * acquire the mutex. A thread attempting to unlock a + * mutex which another thread has locked will return + * with an error. A thread attempting to unlock an + * unlocked mutex will return with an error. This + * type of mutex is only supported for mutexes whose + * process shared attribute is + * PTHREAD_PROCESS_PRIVATE. * * RESULTS - * 0 successfully set attribute, - * EINVAL 'attr' or 'type' is invalid, + * 0 successfully set attribute, + * EINVAL 'attr' or 'type' is invalid, * * ------------------------------------------------------ */ @@ -139,6 +138,6 @@ pthread_mutexattr_settype (pthread_mutexattr_t * attr, { result = EINVAL; } - + return (result); } /* pthread_mutexattr_settype */ -- cgit v1.2.3