[2d19ed6c] | 1 | @c |
---|
| 2 | @c COPYRIGHT (c) 1988-1998. |
---|
| 3 | @c On-Line Applications Research Corporation (OAR). |
---|
| 4 | @c All rights reserved. |
---|
| 5 | @c |
---|
| 6 | @c $Id$ |
---|
| 7 | @c |
---|
| 8 | |
---|
| 9 | @chapter Synchronization |
---|
[76fa649] | 10 | |
---|
[2d19ed6c] | 11 | @section Semaphore Characteristics |
---|
[76fa649] | 12 | |
---|
[6984a19] | 13 | @example |
---|
| 14 | sem_t, Type, Untested Implementation |
---|
| 15 | @end example |
---|
| 16 | |
---|
[2d19ed6c] | 17 | @section Semaphore Functions |
---|
[76fa649] | 18 | |
---|
[68feecfd] | 19 | @subsection Initialize an Unnamed Semaphore |
---|
[76fa649] | 20 | |
---|
| 21 | @example |
---|
[2a087f3] | 22 | sem_init(), Function, Untested Implementation |
---|
[7331714] | 23 | SEM_FAILED, Constant, |
---|
[76fa649] | 24 | @end example |
---|
| 25 | |
---|
[68feecfd] | 26 | @subsection Destroy an Unnamed Semaphore |
---|
[76fa649] | 27 | |
---|
| 28 | @example |
---|
[2a087f3] | 29 | sem_destroy(), Function, Untested Implementation |
---|
[76fa649] | 30 | @end example |
---|
| 31 | |
---|
[68feecfd] | 32 | @subsection Initialize/Open a Named Semaphore |
---|
[76fa649] | 33 | |
---|
| 34 | @example |
---|
[2a087f3] | 35 | sem_open(), Function, Untested Implementation |
---|
[76fa649] | 36 | @end example |
---|
| 37 | |
---|
[68feecfd] | 38 | @subsection Close a Named Semaphore |
---|
[76fa649] | 39 | |
---|
| 40 | @example |
---|
[2a087f3] | 41 | sem_close(), Function, Untested Implementation |
---|
[76fa649] | 42 | @end example |
---|
| 43 | |
---|
[68feecfd] | 44 | @subsection Remove a Named Semaphore |
---|
[76fa649] | 45 | |
---|
| 46 | @example |
---|
[2a087f3] | 47 | sem_unlink(), Function, Untested Implementation |
---|
[76fa649] | 48 | @end example |
---|
| 49 | |
---|
[68feecfd] | 50 | @subsection Lock a Semaphore |
---|
[76fa649] | 51 | |
---|
| 52 | @example |
---|
[2a087f3] | 53 | sem_wait(), Function, Untested Implementation |
---|
| 54 | sem_trywait(), Function, Untested Implementation |
---|
[76fa649] | 55 | @end example |
---|
| 56 | |
---|
[68feecfd] | 57 | @subsection Unlock a Semaphore |
---|
[76fa649] | 58 | |
---|
| 59 | @example |
---|
[2a087f3] | 60 | sem_post(), Function, Untested Implementation |
---|
[76fa649] | 61 | @end example |
---|
| 62 | |
---|
[68feecfd] | 63 | @subsection Get the Value of a Semaphore |
---|
[76fa649] | 64 | |
---|
| 65 | @example |
---|
[2a087f3] | 66 | sem_getvalue(), Function, Untested Implementation |
---|
[76fa649] | 67 | @end example |
---|
| 68 | |
---|
[2d19ed6c] | 69 | @section Mutexes |
---|
[76fa649] | 70 | |
---|
[68feecfd] | 71 | @subsection Mutex Initialization Attributes |
---|
[76fa649] | 72 | |
---|
| 73 | @example |
---|
[3cffce87] | 74 | pthread_mutexattr_init(), Function, Implemented |
---|
| 75 | pthread_mutexattr_destroy(), Function, Implemented |
---|
| 76 | pthread_mutexattr_getpshared(), Function, Implemented |
---|
| 77 | pthread_mutexattr_setpshared(), Function, Implemented |
---|
[7331714] | 78 | PTHREAD_PROCESS_SHARED, Constant, |
---|
| 79 | PTHREAD_PROCESS_PRIVATE, Constant, |
---|
[76fa649] | 80 | @end example |
---|
| 81 | |
---|
[68feecfd] | 82 | @subsection Initializing and Destroying a Mutex |
---|
[76fa649] | 83 | |
---|
| 84 | @example |
---|
[3cffce87] | 85 | pthread_mutex_init(), Function, Implemented |
---|
| 86 | pthread_mutex_destroy(), Function, Implemented |
---|
[7331714] | 87 | PTHREAD_MUTEX_INITIALIZER, Constant, |
---|
[76fa649] | 88 | @end example |
---|
| 89 | |
---|
[68feecfd] | 90 | @subsection Locking and Unlocking a Mutex |
---|
[76fa649] | 91 | |
---|
| 92 | @example |
---|
[3cffce87] | 93 | pthread_mutex_lock(), Function, Implemented |
---|
| 94 | pthread_mutex_trylock(), Function, Implemented |
---|
| 95 | pthread_mutex_unlock(), Function, Implemented |
---|
[76fa649] | 96 | @end example |
---|
| 97 | |
---|
[2d19ed6c] | 98 | @section Condition Variables |
---|
[76fa649] | 99 | |
---|
[68feecfd] | 100 | @subsection Condition Variable Initialization Attributes |
---|
[76fa649] | 101 | |
---|
| 102 | @example |
---|
[3cffce87] | 103 | pthread_condattr_init(), Function, Implemented |
---|
| 104 | pthread_condattr_destroy(), Function, Implemented |
---|
| 105 | pthread_condattr_getpshared(), Function, Implemented |
---|
| 106 | pthread_condattr_setpshared(), Function, Implemented |
---|
[76fa649] | 107 | @end example |
---|
| 108 | |
---|
[68feecfd] | 109 | @subsection Initialization and Destroying Condition Variables |
---|
[76fa649] | 110 | |
---|
| 111 | @example |
---|
[3cffce87] | 112 | pthread_cond_init(), Function, Implemented |
---|
| 113 | pthread_cond_destroy(), Function, Implemented |
---|
[7331714] | 114 | PTHREAD_COND_INITIALIZER, Constant, |
---|
[76fa649] | 115 | @end example |
---|
| 116 | |
---|
[68feecfd] | 117 | @subsection Broadcasting and Signaling a Condition |
---|
[76fa649] | 118 | |
---|
| 119 | @example |
---|
[3cffce87] | 120 | pthread_cond_signal(), Function, Implemented |
---|
| 121 | pthread_cond_broadcast(), Function, Implemented |
---|
[76fa649] | 122 | @end example |
---|
| 123 | |
---|
[68feecfd] | 124 | @subsection Waiting on a Condition |
---|
[2d19ed6c] | 125 | |
---|
[76fa649] | 126 | @example |
---|
[3cffce87] | 127 | pthread_cond_wait(), Function, Implemented |
---|
| 128 | pthread_cond_timedwait(), Function, Implemented |
---|
[76fa649] | 129 | @end example |
---|
| 130 | |
---|