]> git.ipfire.org Git - thirdparty/man-pages.git/blob - man3/pthread_mutexattr_init.3
All pages: Remove the 5th argument to .TH
[thirdparty/man-pages.git] / man3 / pthread_mutexattr_init.3
1 .\" Copyright (c) 2017, Michael Kerrisk <mtk.manpages@gmail.com>
2 .\"
3 .\" SPDX-License-Identifier: Linux-man-pages-copyleft
4 .\"
5 .TH PTHREAD_MUTEXATTR_INIT 3 2019-10-10 "Linux man-pages (unreleased)"
6 .SH NAME
7 pthread_mutexattr_init, pthread_mutexattr_destroy \- initialize and
8 destroy a mutex attributes object
9 .SH LIBRARY
10 POSIX threads library
11 .RI ( libpthread ", " \-lpthread )
12 .SH SYNOPSIS
13 .nf
14 .B #include <pthread.h>
15 .PP
16 .BI "int pthread_mutexattr_init(pthread_mutexattr_t *" attr ");"
17 .BI "int pthread_mutexattr_destroy(pthread_mutexattr_t *" attr ");"
18 .fi
19 .SH DESCRIPTION
20 The
21 .BR pthread_mutexattr_init ()
22 function initializes the mutex attributes object pointed to by
23 .I attr
24 with default values for all attributes defined by the implementation.
25 .PP
26 The results of initializing an already initialized mutex attributes
27 object are undefined.
28 .PP
29 The
30 .BR pthread_mutexattr_destroy ()
31 function destroys a mutex attribute object (making it uninitialized).
32 Once a mutex attributes object has been destroyed, it can be reinitialized with
33 .BR pthread_mutexattr_init ().
34 .PP
35 The results of destroying an uninitialized mutex attributes
36 object are undefined.
37 .SH RETURN VALUE
38 On success, these functions return 0.
39 On error, they return a positive error number.
40 .SH STANDARDS
41 POSIX.1-2001, POSIX.1-2008.
42 .SH NOTES
43 Subsequent changes to a mutex attributes object do not affect mutex that
44 have already been initialized using that object.
45 .SH SEE ALSO
46 .ad l
47 .nh
48 .BR pthread_mutex_init (3),
49 .BR pthread_mutexattr_getpshared (3),
50 .BR pthread_mutexattr_getrobust (3),
51 .BR pthreads (7)