#include <pthread.h> #include <sched.h> int pthread_set_mutexattr_default_np(int kind);Service Program Name: QP0WPTHR
The pthread_set_mutexattr_default_np() function sets the kind attribute in the default mutex attribute object. The default mutex attributes object is used when pthread_mutex_init() is called to specify a NULL pointer for the mutex attributes object parameter.
The kind set may be one of PTHREAD_MUTEX_NONRECURSIVE_NP or PTHREAD_MUTEX_RECURSIVE_NP.
The pthread_set_mutexattr_default_np() function does not affect any currently existing mutex attributes objects, nor does it affect the subsequent behavior of pthread_mutexattr_init() or the PTHREAD_MUTEX_INITIALIZER macro.
Calls to pthread_set_mutexattr_default_np() change how the run-time of the threads creates default mutexes for all code running in the current process. You can negatively affect other code in your process that uses pthread mutexes by using this function.
Use of this function is not recommended because it can affect the creation of mutexes that your application does not directly own.
Note: This function is not portable.
None.
If pthread_set_mutexattr_default() was not successful, the error condition returned usually indicates one of the following errors. Under some conditions, the value returned could indicate an error other than those listed here.
The value specified for the argument is not correct.
Top | Pthread APIs | APIs by category |