1PTHREAD_MUTEXATTR_INIT(3)  Linux Programmer's Manual PTHREAD_MUTEXATTR_INIT(3)
2
3
4

NAME

6       pthread_mutexattr_init,   pthread_mutexattr_destroy  -  initialize  and
7       destroy a mutex attributes object
8

SYNOPSIS

10       #include <pthread.h>
11
12       int pthread_mutexattr_init(pthread_mutexattr_t *attr);
13       int pthread_mutexattr_destroy(pthread_mutexattr_t *attr);
14
15       Compile and link with -pthread.
16

DESCRIPTION

18       The pthread_mutexattr_init() function initializes the mutex  attributes
19       object  pointed  to  by  attr  with  default  values for all attributes
20       defined by the implementation.
21
22       The results of initializing an  already  initialized  mutex  attributes
23       object are undefined.
24
25       The  pthread_mutexattr_destroy()  function  destroys  a mutex attribute
26       object (making it uninitialized).  Once a mutex attributes  object  has
27       been destroyed, it can be reinitialized with pthread_mutexattr_init().
28
29       The  results of destroying an uninitialized mutex attributes object are
30       undefined.
31

RETURN VALUE

33       On success, these functions return 0.  On error, they return a positive
34       error number.
35

CONFORMING TO

37       POSIX.1-2001, POSIX.1-2008.
38

NOTES

40       Subsequent  changes  to  a  mutex attributes object do not affect mutex
41       that have already been initialized using that object.
42

SEE ALSO

44       pthread_mutex_init(3), pthread_mutexattr_getrobust(3),
45       pthread_mutexattr_getpshared(3), pthreads(7)
46

COLOPHON

48       This page is part of release 4.15 of the Linux man-pages project.  A
49       description of the project, information about reporting bugs, and the
50       latest version of this page, can be found at
51       https://www.kernel.org/doc/man-pages/.
52
53
54
55Linux                             2017-08-20         PTHREAD_MUTEXATTR_INIT(3)
Impressum