Changeset 56853af in rtems
- Timestamp:
- Jun 15, 1999, 12:32:19 AM (22 years ago)
- Branches:
- 4.10, 4.11, 4.8, 4.9, 5, master
- Children:
- 1b67be71
- Parents:
- d48ea69
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
doc/posix_users/mutex.t
rd48ea69 r56853af 11 11 @section Introduction 12 12 13 The mutex manager ... 14 15 The directives provided by the mutex manager are: 13 The mutex manager implements the functionality required of the mutex 14 manager as defined by POSIX 1003.1b-1996. This standard requires that 15 a compliant operating system provide the facilties to ensure that 16 threads can operate with mutual exclusion from one another and 17 defines the API that must be provided. 18 19 The services provided by the mutex manager are: 16 20 17 21 @itemize @bullet 18 @item @code{pthread_mutexattr_init} - 19 @item @code{pthread_mutexattr_destroy} - 20 @item @code{pthread_mutexattr_setprotocol} - 21 @item @code{pthread_mutexattr_getprotocol} - 22 @item @code{pthread_mutexattr_setprioceiling} - 23 @item @code{pthread_mutexattr_getprioceiling} - 24 @item @code{pthread_mutexattr_setpshared} - 25 @item @code{pthread_mutexattr_getpshared} - 26 @item @code{pthread_mutex_init} - 27 @item @code{pthread_mutex_destroy} - 28 @item @code{pthread_mutex_lock} - 29 @item @code{pthread_mutex_trylock} - 30 @item @code{pthread_mutex_timedlock} - 31 @item @code{pthread_mutex_unlock} - 32 @item @code{pthread_mutex_setprioceiling} - 33 @item @code{pthread_mutex_getprioceiling} - 22 @item @code{pthread_mutexattr_init} - Initialize a Mutex Attribute Set 23 @item @code{pthread_mutexattr_destroy} - Destroy a Mutex Attribute Set 24 @item @code{pthread_mutexattr_setprotocol} - Set the Blocking Protocol 25 @item @code{pthread_mutexattr_getprotocol} - Get the Blocking Protocol 26 @item @code{pthread_mutexattr_setprioceiling} - Set the Priority Ceiling 27 @item @code{pthread_mutexattr_getprioceiling} - Get the Priority Ceiling 28 @item @code{pthread_mutexattr_setpshared} - Set the Visibility 29 @item @code{pthread_mutexattr_getpshared} - Get the Visibility 30 @item @code{pthread_mutex_init} - Initialize a Mutex 31 @item @code{pthread_mutex_destroy} - Destroy a Mutex 32 @item @code{pthread_mutex_lock} - Lock a Mutex 33 @item @code{pthread_mutex_trylock} - Poll to Lock a Mutex 34 @item @code{pthread_mutex_timedlock} - Lock a Mutex with Timeout 35 @item @code{pthread_mutex_unlock} - Unlock a Mutex 36 @item @code{pthread_mutex_setprioceiling} - Dynamically Set the Priority Ceiling 37 @item @code{pthread_mutex_getprioceiling} - Dynamically Get the Priority Ceiling 34 38 @end itemize 35 39 36 40 @section Background 37 41 42 @subsection Mutex Attributes 43 44 Mutex attributes are utilized only at mutex creation time. A mutex 45 attribute structure may be initialized and passed as an argument to 46 the @code{mutex_init} routine. Note that the priority ceiling of 47 a mutex may be set at run-time. 48 49 @table @b 50 @item blocking protcol 51 is the XXX 52 53 @item priority ceiling 54 is the XXX 55 56 @item pshared 57 is the XXX 58 59 @end table 60 61 @subsection PTHREAD_MUTEX_INITIALIZER 62 63 This is a special value that a variable of type @code{pthread_mutex_t} 64 may be statically initialized to as shown below: 65 66 @example 67 pthread_mutex_t my_mutex = PTHREAD_MUTEX_INITIALIZER; 68 @end example 69 70 This indicates that @code{my_mutex} will be automatically initialized 71 by an implicit call to @code{pthread_mutex_init} the first time 72 the mutex is used. 73 74 Note that the mutex will be initialized with default attributes. 75 76 @section Operations 77 38 78 There is currently no text in this section. 39 79 40 @section Operations 41 42 There is currently no text in this section. 43 44 @section Directives 45 46 This section details the mutex manager's directives. 47 A subsection is dedicated to each of this manager's directives 80 @section Services 81 82 This section details the mutex manager's services. 83 A subsection is dedicated to each of this manager's services 48 84 and describes the calling sequence, related constants, usage, 49 85 and status codes. 50 86 51 87 @page 52 @subsection pthread_mutexattr_init 88 @subsection pthread_mutexattr_init - Initialize a Mutex Attribute Set 53 89 54 90 @subheading CALLING SEQUENCE: … … 72 108 @subheading DESCRIPTION: 73 109 74 @subheading NOTES: 75 76 @page 77 @subsection pthread_mutexattr_destroy 110 The @code{pthread_mutexattr_init} routine initializes the mutex attributes 111 object specified by @code{attr} with the default value for all of the 112 individual attributes. 113 114 @subheading NOTES: 115 116 XXX insert list of default attributes here. 117 118 @page 119 @subsection pthread_mutexattr_destroy - Destroy a Mutex Attribute Set 78 120 79 121 @subheading CALLING SEQUENCE: … … 100 142 @subheading DESCRIPTION: 101 143 102 @subheading NOTES: 103 104 @page 105 @subsection pthread_mutexattr_setprotocol 144 The @code{pthread_mutex_attr_destroy} routine is used to destroy a mutex 145 attributes object. The behavior of using an attributes object after 146 it is destroyed is implementation dependent. 147 148 @subheading NOTES: 149 150 NONE 151 152 @page 153 @subsection pthread_mutexattr_setprotocol - Set the Blocking Protocol 106 154 107 155 @subheading CALLING SEQUENCE: … … 132 180 @subheading DESCRIPTION: 133 181 134 @subheading NOTES: 135 136 @page 137 @subsection pthread_mutexattr_getprotocol 182 The @code{pthread_mutexattr_setprotocol} routine is used to set value of the 183 @code{protocol} attribute. This attribute controls the order in which 184 threads waiting on this mutex will receive it. 185 186 The @code{protocol} can be one of the following: 187 188 @table @b 189 190 @item @code{PTHREAD_PRIO_NONE} 191 in which case blocking order is FIFO. 192 193 @item @code{PTHREAD_PRIO_INHERIT} 194 in which case blocking order is priority with the priority inheritance 195 protocol in effect. 196 197 @item @code{PTHREAD_PRIO_PROTECT} 198 in which case blocking order is priority with the priority ceiling 199 protocol in effect. 200 201 @end table 202 203 @subheading NOTES: 204 205 There is currently no way to get simple priority blocking ordering 206 with POSIX mutexes even though this could easily by supported by RTEMS. 207 208 @page 209 @subsection pthread_mutexattr_getprotocol - Get the Blocking Protocol 138 210 139 211 @subheading CALLING SEQUENCE: … … 164 236 @subheading DESCRIPTION: 165 237 166 @subheading NOTES: 167 168 @page 169 @subsection pthread_mutexattr_setprioceiling 238 The @code{pthread_mutexattr_getprotocol} routine is used to obtain 239 the value of the @code{protocol} attribute. This attribute controls 240 the order in which threads waiting on this mutex will receive it. 241 242 @subheading NOTES: 243 244 NONE 245 246 @page 247 @subsection pthread_mutexattr_setprioceiling - Set the Priority Ceiling 170 248 171 249 @subheading CALLING SEQUENCE: … … 196 274 @subheading DESCRIPTION: 197 275 198 @subheading NOTES: 199 200 @page 201 @subsection pthread_mutexattr_getprioceiling 276 The @code{pthread_mutexattr_setprioceiling} routine is used to set value of the 277 @code{prioceiling} attribute. This attribute specifies the priority that 278 is the ceiling for threads obtaining this mutex. Any task obtaining this 279 mutex may not be of greater priority that the ceiling. If it is of lower 280 priority, then its priority will be elevated to @code{prioceiling}. 281 282 @subheading NOTES: 283 284 NONE 285 286 @page 287 @subsection pthread_mutexattr_getprioceiling - Get the Priority Ceiling 202 288 203 289 @subheading CALLING SEQUENCE: … … 228 314 @subheading DESCRIPTION: 229 315 230 @subheading NOTES: 231 232 @page 233 @subsection pthread_mutexattr_setpshared 316 The @code{pthread_mutexattr_getprioceiling} routine is used to obtain the 317 value of the @code{prioceiling} attribute. This attribute specifies the 318 priority ceiling for this mutex. 319 320 321 @subheading NOTES: 322 323 324 NONE 325 @page 326 @subsection pthread_mutexattr_setpshared - Set the Visibility 234 327 235 328 @subheading CALLING SEQUENCE: … … 263 356 264 357 @page 265 @subsection pthread_mutexattr_getpshared 358 @subsection pthread_mutexattr_getpshared - Get the Visibility 266 359 267 360 @subheading CALLING SEQUENCE: … … 295 388 296 389 @page 297 @subsection pthread_mutex_init 390 @subsection pthread_mutex_init - Initialize a Mutex 298 391 299 392 @subheading CALLING SEQUENCE: … … 334 427 335 428 @page 336 @subsection pthread_mutex_destroy 429 @subsection pthread_mutex_destroy - Destroy a Mutex 337 430 338 431 @subheading CALLING SEQUENCE: … … 363 456 364 457 @page 365 @subsection pthread_mutex_lock 458 @subsection pthread_mutex_lock - Lock a Mutex 366 459 367 460 @subheading CALLING SEQUENCE: … … 396 489 397 490 @page 398 @subsection pthread_mutex_trylock 491 @subsection pthread_mutex_trylock - Poll to Lock a Mutex 399 492 400 493 @subheading CALLING SEQUENCE: … … 429 522 430 523 @page 431 @subsection pthread_mutex_timedlock 524 @subsection pthread_mutex_timedlock - Lock a Mutex with Timeout 432 525 433 526 @subheading CALLING SEQUENCE: … … 468 561 469 562 @page 470 @subsection pthread_mutex_unlock 563 @subsection pthread_mutex_unlock - Unlock a Mutex 471 564 472 565 @subheading CALLING SEQUENCE: … … 493 586 494 587 @page 495 @subsection pthread_mutex_setprioceiling 588 @subsection pthread_mutex_setprioceiling - Dynamically Set the Priority Ceiling 496 589 497 590 @subheading CALLING SEQUENCE: … … 526 619 527 620 @page 528 @subsection pthread_mutex_getprioceiling 621 @subsection pthread_mutex_getprioceiling - Get the Current Priority Ceiling 529 622 530 623 @subheading CALLING SEQUENCE:
Note: See TracChangeset
for help on using the changeset viewer.