Sets the value of the kind attribute of a mutex attributes object.
Threads Library (libpthreads.a)
int pthread_mutexattr_setkind_np ( attr, kind)
The pthread_mutexattr_setkind_np subroutine sets the value of the kind attribute of the mutex attributes object attr. This attribute specifies the kind of the mutex created with this attributes object.
- The pthread.h header file must be the first included file of each source file using the threads library. Otherwise, the -D_THREAD_SAFE compilation flag should be used, or the cc_r compiler used. In this case, the flag is automatically set.
- The pthread_mutexattr_setkind_np subroutine is not portable.
|attr||Specifies the mutex attributes object.|
|kind||Specifies the kind to set. It must have one of the following
Upon successful completion, 0 is returned. Otherwise, an error code is returned.
pthread_mutexattr_setkind_np subroutine is unsuccessful if the
following is true:
|EINVAL||The attr parameter is not valid.|
|ENOTSUP||The value of the kind parameter is not supported.|
This subroutine is part of the Base Operating System (BOS) Runtime.
This subroutine is provided only for compatibility with the DCE threads. It should not be used when writing new applications.
The pthread_mutexattr_getkind_np (pthread_mutexattr_getkind_np Subroutine) subroutine.
Using Mutexes in AIX 5L Version 5.1 General Programming Concepts: Writing and Debugging Programs.