[Return to Bookshelf] [Contents] [Previous Section] [Next Section] [Index] [Help]


pthread_mutexattr_gettype_np

Obtains the mutex type attribute used when a mutex is created.

Syntax

pthread_mutexattr_gettype_np(
                             attr,
                             type );
 


Argument Data Type Access

attr opaque pthread_ read mutexattr_t type integer write


C Binding

#include 

int pthread_mutexattr_gettype_np ( const pthread_mutexattr_t *attr, int *type);

Arguments

attr
Mutex attributes object whose mutex type is obtained.
type
Receives the value of the mutex type attribute. The type argument specifies the type of mutex that is created. Valid values are:

Description

This routine obtains the mutex type attribute that is used when a mutex is created. See the pthread_mutexattr_settype_ np description for information about mutex type attributes.

Return Values

On successful completion, this routine returns the mutex type in type.

If an error condition occurs, this routine returns an integer value indicating the type of the error. Possible return values are as follows:


Return        Description

0 Successful completion. [EINVAL] The value specified by attr is invalid.


Associated Routines

   pthread_mutexattr_init
   pthread_mutexattr_settype_np
   pthread_mutex_init



[Return to Bookshelf] [Contents] [Previous Section] [Next Section] [Index] [Help]