1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238
|
.\" Copyright (C) 1996-1999 Free Software Foundation, Inc.
.\"
.\" Permission is granted to make and distribute verbatim copies of
.\" this manual provided the copyright notice and this permission notice are
.\" preserved on all copies.
.\"
.\" Permission is granted to copy and distribute modified versions of
.\" this manual under the conditions for verbatim copying, provided that
.\" the entire resulting derived work is distributed under the terms of a
.\" permission notice identical to this one.
.\"
.\" Permission is granted to copy and distribute translations of this
.\" manual into another language, under the above conditions for modified
.\" versions, except that this permission notice may be stated in a
.\" translation approved by the Foundation.
.\"
.\" Copyright (C) 1996 Xavier Leroy.
.\"
.\" Japanese Version Copyright (C) 2002-2003 Suzuki Takashi
.\" all rights reserved.
.\" Translated Sat Jan 4 14:23:32 JST 2003
.\" by Suzuki Takashi.
.\"
.\"WORD: mutex creation attribute mutex°
.\"WORD: mutex attribute object mutex°֥
.\"WORD: mutex kind mutex
.\"WORD: mutex kind attribute mutex̤ɽ°
.\"WORD: mutex type mutex
.\"WORD: timed Ĥ
.\"
.\"
.TH PTHREAD_MUTEXATTR 3 LinuxThreads
.SH "̾"
pthread_mutexattr_init, pthread_mutexattr_destroy, pthread_mutexattr_settype, pthread_mutexattr_gettype
\- mutex °
.SH ""
.B #include <pthread.h>
.BI "int pthread_mutexattr_init(pthread_mutexattr_t *" attr ");"
.BI "int pthread_mutexattr_destroy(pthread_mutexattr_t *" attr ");"
.BI "int pthread_mutexattr_settype(pthread_mutexattr_t *" attr ", int " kind ");"
.BI "int pthread_mutexattr_gettype(const pthread_mutexattr_t *" attr ", int *" kind ");"
.SH ""
mutex ° mutex ˡ
.BR "pthread_mutex_init" (3)
2 Ȥ mutex °֥ȤϤȤ
ꤹ뤳ȤǤ롣
.B "NULL"
ϤȤϡ٤Ƥ°ǥեͤ
ꤵ줿 mutex °֥ȤϤȤƱǤ롣
.B "pthread_mutexattr_init"
mutex °֥
.I "attr"
٤Ƥ°ǥեȤͤꤹ롣
.B "pthread_mutexattr_destroy"
mutex °֥Ȥ˲롣
˲줿 mutex °֥Ȥ
ƤӽޤǺƻѤƤϤʤʤ
.B "pthread_mutexattr_destroy"
LinuxThreads μǤϲ⤷ʤ
LinuxThreads Ϥ 1 Ĥ mutex °бƤ롣
mutex (mutex kind) ǡ
® (fast) mutex ɽ
.B "PTHREAD_MUTEX_FAST_NP"
ֺƵŪ (recursive) mutex ɽ
.B "PTHREAD_MUTEX_RECURSIVE_NP"
֥顼Ԥʤ (error checking) mutex ɽ
.B "PTHREAD_MUTEX_ERRORCHECK_NP"
Τ줫ͤȤ롣
.B "NP"
Ȥ褦ˡ
POSIX ɸФݡ֥Ǥʤĥǡ
ݡ֥ʥץǤѤ٤Ǥʤ
mutex ̤ϡ
륹åɤʬȤ
.BR "pthread_mutex_lock" (3)
ǤǤݻƤ mutex å褦ȤȤˡ
뤫ꤹ롣
mutex ® (fast) פȤ̤ξ硢
.BR "pthread_mutex_lock" (3)
ñ˸ƤӽФåɤʱߤ롣
mutex ֥顼Ԥʤ (error checking) פȤ̤ξ硢
.BR "pthread_mutex_lock" (3)
ϥ顼
.B "EDEADLK"
ȤȤľ֤롣
mutex ֺƵŪ (recursive) פȤ̤ξ硢
.BR "pthread_mutex_lock" (3)
θƤӽФ֤ͤȤȤľ֤롣
mutex ݻƤ륹åɤå mutex ˵Ͽ롣
ݻƤ륹åɤå֤뤿ˤϡ
Ʊ
.BR "pthread_mutex_unlock" (3)
ƤӽФʤФʤʤ
ǥեȤ mutex ̤ϡ® (fast) ס
ʤ
.B "PTHREAD_MUTEX_FAST_NP"
Ǥ롣
.B "pthread_mutexattr_settype"
.I "attr"
mutex ̤ɽ°
.I "kind"
Ǽͤꤹ롣
.B "pthread_mutexattr_gettype"
.I "attr"
mutex ̤ɽ°
.I "kind"
ǻؤΰ˳Ǽ롣
.SH "֤"
.B "pthread_mutexattr_init"
.B "pthread_mutexattr_destroy"
.B "pthread_mutexattr_gettype"
Ͼ 0 ֤
.B "pthread_mutexattr_settype"
0 顼ξ 0 Υ顼ɤ֤
.SH "顼"
顼ΤȤ
.B "pthread_mutexattr_settype"
ϼΤ褦ʥ顼ɤ֤:
.TP
.B "EINVAL"
.I "kind"
.B "PTHREAD_MUTEX_FAST_NP"
.B "PTHREAD_MUTEX_RECURSIVE_NP"
.B "PTHREAD_MUTEX_ERRORCHECK_NP"
ΤǤʤ
.SH ""
Xavier Leroy <Xavier.Leroy@inria.fr>
.SH "Ϣ"
.BR "pthread_mutex_init" (3),
.BR "pthread_mutex_lock" (3),
.BR "pthread_mutex_unlock" (3).
[1] glibc-linuxthreads κǿΥɥȤ Texinfo Ƥ롣
εҤ glibc-linuxthreads-2.2 ʹߤǤʤ
ʲ glibc-linuxthreads-2.3.1 Texinfo ե뤫ΰѤǤ롣
(kind) (type) ѹƤ롣
LinuxThreads Ϥ 1 Ĥ mutex °бƤ롣
mutex (mutex type) ǡ
® (fast) mutex ɽ
.B "PTHREAD_MUTEX_ADAPTIVE_NP"
ֺƵŪ (recursive) mutex ɽ
.B "PTHREAD_MUTEX_RECURSIVE_NP"
ֻĤ (timed) mutex ɽ
.B "PTHREAD_MUTEX_TIMED_NP"
֥顼Ԥʤ (error checking) mutex ɽ
.B "PTHREAD_MUTEX_ERRORCHECK_NP"
Τ줫ͤȤ롣
.B "NP"
Ȥ褦ˡ
POSIX ɸФݡ֥Ǥʤĥǡ
ݡ֥ʥץǤѤ٤Ǥʤ
mutex ϡ
륹åɤʬȤ
.BR "pthread_mutex_lock" (3)
ǤǤݻƤ mutex å褦ȤȤˡ
뤫ꤹ롣
mutex ® (fast) פȤξ硢
.BR "pthread_mutex_lock" (3)
ñ˸ƤӽФåɤʱߤ롣
mutex ֥顼Ԥʤ (error checking) פȤξ硢
.BR "pthread_mutex_lock" (3)
ϥ顼
.B "EDEADLK"
ȤȤľ֤롣
mutex ֺƵŪ (recursive) פȤξ硢
.BR "pthread_mutex_lock" (3)
θƤӽФ֤ͤȤȤľ֤롣
mutex ݻƤ륹åɤå mutex ˵Ͽ롣
ݻƤ륹åɤå֤뤿ˤϡ
Ʊ
.BR "pthread_mutex_unlock" (3)
ƤӽФʤФʤʤ
ǥեȤ mutex ϡֻĤ (timed) ס
ʤ
.B "PTHREAD_MUTEX_TIMED_NP"
Ǥ롣
[2] LinuxThreads Ǥ mutex ץ֤Ƕͭ뤳ȤϤǤʤ
glibc-linuxthreads-2.2 ʹߡ 2 ĤδؿɲäƤ롣
.BI "int pthread_mutexattr_getpshared(const pthread_mutexattr_t *" attr ", int *" pshared ");"
.I "pshared"
ǻؤΰ
.B "PTHREAD_PROCESS_PRIVATE"
Ǽ 0 ֤
.BI "int pthread_mutexattr_setpshared(pthread_mutexattr_t *" attr ", int " pshared ");"
.I "pshared"
.B "PTHREAD_PROCESS_PRIVATE"
.B "PTHREAD_PROCESS_SHARED"
ΤǤʤ硢
.B "EINVAL"
֤
.I "pshared"
.B "PTHREAD_PROCESS_SHARED"
ξ硢
.B "ENOSYS"
֤
ʳξ硢 0 ֤
|