pthread_mutexattr_getkind_np,
pthread_mutexattr_setkind_np —
mutex attribute operations
(legacy)
POSIX Threads Library (libpthread,
-lpthread)
#include
<pthread_np.h>
int
pthread_mutexattr_getkind_np(pthread_mutexattr_t
attr);
int
pthread_mutexattr_setkind_np(pthread_mutexattr_t
*attr, int
kind);
The pthread_mutexattr_getkind_np()
function returns a positive value representing the “kind” of
the mutex attribute attr if successful; otherwise the
value -1 is returned and the global variable errno is
set to indicate the error.
The pthread_mutexattr_setkind_np() function returns
the value 0 if successful; otherwise the value -1 is returned
and the global variable errno is set to indicate the
error.
The pthread_mutexattr_getkind_np() and
pthread_mutexattr_setkind_np() functions will fail
if:
- [
EINVAL]
- The value specified by attr is invalid.