xref: /freebsd/share/man/man3/pthread_mutexattr_getkind_np.3 (revision 3ac17feb8af17e86c514beda512861a244c601bc)
1318d8cfdSAlexey Zelkin.\" Copyright (c) 2003 Alexey Zelkin <phantom@FreeBSD.org>
2318d8cfdSAlexey Zelkin.\" All rights reserved.
3318d8cfdSAlexey Zelkin.\"
4318d8cfdSAlexey Zelkin.\" Redistribution and use in source and binary forms, with or without
5318d8cfdSAlexey Zelkin.\" modification, are permitted provided that the following conditions
6318d8cfdSAlexey Zelkin.\" are met:
7318d8cfdSAlexey Zelkin.\" 1. Redistributions of source code must retain the above copyright
8318d8cfdSAlexey Zelkin.\"    notice, this list of conditions and the following disclaimer.
9318d8cfdSAlexey Zelkin.\" 2. Redistributions in binary form must reproduce the above copyright
10318d8cfdSAlexey Zelkin.\"    notice, this list of conditions and the following disclaimer in the
11318d8cfdSAlexey Zelkin.\"    documentation and/or other materials provided with the distribution.
12318d8cfdSAlexey Zelkin.\"
13318d8cfdSAlexey Zelkin.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
14318d8cfdSAlexey Zelkin.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15318d8cfdSAlexey Zelkin.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
16318d8cfdSAlexey Zelkin.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
17318d8cfdSAlexey Zelkin.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
18318d8cfdSAlexey Zelkin.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
19318d8cfdSAlexey Zelkin.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
20318d8cfdSAlexey Zelkin.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
21318d8cfdSAlexey Zelkin.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
22318d8cfdSAlexey Zelkin.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
23318d8cfdSAlexey Zelkin.\" SUCH DAMAGE.
24318d8cfdSAlexey Zelkin.\"
25318d8cfdSAlexey Zelkin.\" $FreeBSD$
26318d8cfdSAlexey Zelkin.\"
27318d8cfdSAlexey Zelkin.Dd February 13, 2003
28318d8cfdSAlexey Zelkin.Dt PTHREAD_MUTEXATTR_GETKIND_NP 3
29318d8cfdSAlexey Zelkin.Os
30318d8cfdSAlexey Zelkin.Sh NAME
31318d8cfdSAlexey Zelkin.Nm pthread_mutexattr_getkind_np ,
32318d8cfdSAlexey Zelkin.Nm pthread_mutexattr_setkind_np
33ace5be68SRuslan Ermilov.Nd mutex attribute operations (legacy)
34318d8cfdSAlexey Zelkin.Sh LIBRARY
35318d8cfdSAlexey Zelkin.Lb libc_r
36ec7452f1SRuslan Ermilov.Lb libpthread
37f9f9d2e8SRuslan Ermilov.Lb libthr
38318d8cfdSAlexey Zelkin.Sh SYNOPSIS
39318d8cfdSAlexey Zelkin.In pthread_np.h
40318d8cfdSAlexey Zelkin.Ft int
41318d8cfdSAlexey Zelkin.Fn pthread_mutexattr_getkind_np "pthread_mutexattr_t attr"
42318d8cfdSAlexey Zelkin.Ft int
43318d8cfdSAlexey Zelkin.Fn pthread_mutexattr_setkind_np "pthread_mutexattr_t *attr" "int kind"
44318d8cfdSAlexey Zelkin.Sh DESCRIPTION
45ace5be68SRuslan Ermilov.Bf -symbolic
46ace5be68SRuslan ErmilovThese functions are deprecated and non-portable implementation of
47ace5be68SRuslan Ermilovthe mutex type manipulation.
48ace5be68SRuslan Ermilov.Ef
49318d8cfdSAlexey Zelkin.Pp
50ace5be68SRuslan ErmilovIt is recommended to use the
51ace5be68SRuslan Ermilov.Xr pthread_mutexattr_gettype 3
52318d8cfdSAlexey Zelkinand
53ace5be68SRuslan Ermilov.Xr pthread_mutexattr_settype 3
54318d8cfdSAlexey Zelkinfunctions instead.
55318d8cfdSAlexey Zelkin.Sh RETURN VALUES
56318d8cfdSAlexey ZelkinThe
57318d8cfdSAlexey Zelkin.Fn pthread_mutexattr_getkind_np
58ace5be68SRuslan Ermilovfunction returns a positive value representing the
59ace5be68SRuslan Ermilov.Dq kind
60ace5be68SRuslan Ermilovof the mutex attribute
61318d8cfdSAlexey Zelkin.Fa attr
62ace5be68SRuslan Ermilovif successful; otherwise the value \-1 is returned and the global variable
63ace5be68SRuslan Ermilov.Va errno
64318d8cfdSAlexey Zelkinis set to indicate the error.
65318d8cfdSAlexey Zelkin.Pp
66ace5be68SRuslan Ermilov.Rv -std pthread_mutexattr_setkind_np
67318d8cfdSAlexey Zelkin.Sh ERRORS
68318d8cfdSAlexey ZelkinThe
69318d8cfdSAlexey Zelkin.Fn pthread_mutexattr_getkind_np
70318d8cfdSAlexey Zelkinand
71318d8cfdSAlexey Zelkin.Fn pthread_mutexattr_setkind_np
72318d8cfdSAlexey Zelkinfunctions will fail if:
73ace5be68SRuslan Ermilov.Bl -tag -width Er
74318d8cfdSAlexey Zelkin.It Bq Er EINVAL
75318d8cfdSAlexey ZelkinThe value specified by
76318d8cfdSAlexey Zelkin.Fa attr
77ace5be68SRuslan Ermilovis invalid.
78318d8cfdSAlexey Zelkin.El
79318d8cfdSAlexey Zelkin.Sh SEE ALSO
80318d8cfdSAlexey Zelkin.Xr pthread_mutexattr_gettype 3 ,
81ace5be68SRuslan Ermilov.Xr pthread_mutexattr_settype 3 ,
823ac17febSRuslan Ermilov.Xr pthread_mutex_destroy 3 ,
833ac17febSRuslan Ermilov.Xr pthread_mutex_init 3
84