Index
Symbols
| |
| __errno | 159 |
| __t_errno | 159 |
| _r | 227 |
| _REENTRANT | 157 |
Numerics
A
| |
| Ada | 140 |
| adb | 161 |
| adding |
| .....to LWP pool | 202 |
| .....signals to mask | 32 |
| aio_errno | 146 |
| AIO_INPROGRESS | 146 |
| aio_result_t | 145, 146 |
| aiocancel(3) | 145, 146 |
| aioread(3) | 145, 146 |
| aiowait(3) | 146 |
| aiowrite(3) | 145, 146 |
| algorithms |
| .....faster with MT | 3 |
| .....parallel | 244 |
| .....sequential | 244 |
| alternate signal stacks | 8, 132 |
| ANSI C | 161 |
| application-level threads |
| .....Seeuser-level threads |
| architecture |
| .....multiprocessor | 240 |
| .....SPARC | 70, 241, 243 |
| assert statement | 104, 231 |
| asynchronous |
| .....event notification | 108 |
| .....I/O | 144, 145, 146 |
| .....semaphore use | 108 |
| .....signals | 132 to 138 |
| Async-Signal-Safe |
| .....category | 151 |
| .....functions | 137, 153 |
| .....and signal handlers | 140 |
| atomic, defined | 70 |
| automatic |
| .....arrays, problems | 160 |
| .....LWP number adjustments | 130 |
| .....stack allocation | 62 |
B
| |
| barrier synchronization | 244 |
| binary semaphores | 107 |
| |
| binding |
| .....reasons to bind | 8, 130, 237, 239 |
| .....threads to LWPs | 202 |
| .....values to keys | 18, 208 |
| bottlenecks | 233 |
| bound threads | 6, 130, 237 |
| .....See alsobinding |
| .....alternate signal stacks | 132 |
| .....concurrency | 238 |
| .....defined | 2 |
| .....mixing with unbound threads | 237 |
| .....no LWP caching | 237 |
| .....priority | 128 |
| .....reasons to bind | 8, 130 |
| .....scheduling class | 128 |
C
| |
| C++ | 161 |
| cache, defined | 240 |
| caching |
| .....not for bound thread LWPs | 237 |
| .....threads data structure | 234 |
| changing the signal mask | 32, 205 |
| coarse-grained locking | 230 |
| code lock | 229, 230 |
| code monitor | 229, 231 |
| completion semantics | 139 |
| concurrency | 230, 238, 239 |
| .....level | 202 |
| .....unbound threads | 190 |
| cond_broadcast(3T) | 215, 216 |
| cond_init(3T) | 220, 221 |
| cond_signal(3T) | 215 |
| cond_wait(3T) | 143 |
| condition variables | 69, 87 to 105, 142 |
| contention | 232, 233 |
| continue execution | 189 |
| coroutine linkage | 236 |
| counting semaphores Seesemaphores |
| creating |
| .....stacks | 62, 63, 64, 201, 203 |
| .....threads | 12 to 15, 234, 238 |
| ......thread-specific keys | 18, 19, 20, 21, 207, 208 |
| critical section | 242 |
| custom stack | 62, 203, 204 |
D
| |
| -D_POSIX_C_SOURCE | 157 |
| -D_REENTRANT | 157 |
| daemon threads | 202 |
| data |
| ......global | 18 |
| ......local | 18 |
| ......lock | 229, 230 |
| ......profile | 126 |
| ......races | 149 |
| ......shared | 6, 242 |
| ......thread specific,Seethread-specificdata |
| dbx | 161 |
| deadlock | 159, 231, 232 |
| debugging | 159 to 162 |
| ......adb | 161 |
| ......dbx | 161 |
| deleting signals from mask | 32 |
| destructor function | 19, 25 |
| detached threads | 15, 48, 201 |
| Dijkstra, E. W. | 106 |
E
| |
| EAGAIN | 14, 19, 77, 93, 112, 191, 202 |
| EBUSY | 77, 80, 81, 93, 101, 196, 197 |
| EDEADLK | 15, 78, 111, 112 |
| EFAULT | 194, 195, 196, 197 to 198 |
| EINTR | 111, 112, 124, 133, 142, 143 |
| EINVAL | 14, 15, 17, 20, 21, 27, 29, 31, 33, 38, 39, 47, 48, 49, 51, 52, 53, 54, 55, 56, 57, 58, 60, 64, 67, 72, 73, 74, 75, 77, 78, 79, 80, 81, 89, 90, 91, 93, 95, 96, 98, 100, 101, 109, 110, 111, 112, 113, 191, 194, 195, 196, 197 to 198, 203 |
| ENOMEM | 19, 21, 72, 77, 89, 93, 202 |
| |
| ENOSPC | 109 |
| ENOSYS | 28 |
| ENOTSUP | 29, 53, 55 |
| EPERM | 79, 109 |
| errno | 22, 157, 159, 226 |
| errno.h | 155 |
| error checking | 31 |
| ESRCH | 15, 17, 30, 31, 37, 189, 190 |
| ETIME | 98 |
| event notification | 108 |
| examining the signal mask | 32, 205 |
| exec(2) | 120, 122, 124 |
| execution resources | 190, 191, 238 |
| exit(2) | 124, 202 |
| exit(3C) | 34 |
F
| |
| finding |
| .....minimum stack size | 203 |
| .....thread concurrency level | 191 |
| .....thread priority | 209 |
| fine-grained locking | 230 |
| flockfile(3S) | 147 |
| flowchart of compile options | 158 |
| fork(2) | 122, 124, 215 |
| fork1(2) | 122, 124 |
| FORTRAN | 161, 176 |
| funlockfile(3S) | 147 |
G
| |
| getc(3S) | 147 |
| getc_unlocked(3S) | 147 |
| gethostbyname(3N) | 227 |
| gethostbyname_r(3N) | 227 |
| getrusage(3B) | 127 |
| global |
| .....data | 229 |
| .....memory | 159 |
| .....side effects | 234 |
| .....state | 229 |
| ......variables | 22, 23, 225 |
| global variables | 226 |
H
| |
| heap,malloc(3C) storage from | 16 |
I
| |
| I/O |
| ......asynchronous | 144, 145 |
| ......nonsequential | 146 |
| ......standard | 147 |
| ......synchronous | 144 |
| inheriting priority | 200 |
| interrupt | 132 |
| interval timer | 237 |
| invariants | 104, 230 |
J
| |
| joining threads | 14, 48, 206 |
K
| |
| kernel context switching | 6 |
| keys |
| ......bind value to key | 208 |
| ......get specific key | 21, 208 |
| ......global into private | 23 |
| ......storing value of | 21, 208 |
| kill(2) | 132, 135 |
L
| |
| -lc | 157, 158 |
| ld | 157, 158 |
| libC | 154 |
| libc | 153, 155, 158 |
| libdl_stubs | 153 |
| libintl | 153, 155 |
| libm | 153, 155 |
| libmalloc | 153, 155 |
| libmapmalloc | 153, 155 |
| |
| libnsl | 154, 155, 159 |
| libposix4 | 155 |
| libpthread | 155, 158 |
| library |
| .....C routines | 225 |
| .....MT safety | 153 |
| .....threads | 155, 235 |
| libresolv | 154 |
| libsocket | 154, 155 |
| libthread | 5, 155, 158, 235 |
| libw | 154, 155 |
| libX11 | 154 |
| lightweight processes | 7, 127 to 130, 235, 236 |
| .....adding an LWP | 202 |
| .....creation | 236 |
| .....debugging | 161 |
| .....defined | 2 |
| .....independence | 236 |
| .....multiplexing | 236 |
| .....not supported | 7 |
| .....profile state | 126 |
| .....shortage | 131 |
| .....special capabilities | 236 |
| .....in SunOS 4.0 | 7 |
| .....and system calls | 237 |
| limits, resources | 127 |
| limits.h | 155 |
| linking | 155 |
| local variable | 227 |
| lock hierarchy | 232 |
| lock_lint | 83 |
| locking |
| .....See alsolocks |
| .....coarse grained | 230, 233 |
| .....code | 229 |
| .....conditional | 84 |
| .....data | 229 |
| .....fine-grained | 230, 233 |
| .....guidelines | 233 |
| .....invariants | 230 |
| LockLint tool | 163 |
| LockLint usage | 172 |
| locks |
| ......See alsolocking |
| ......mutual exclusion | 69 to 86, 122, 142 |
| ......readers/writer | 69, 198 |
| longjmp(3C) | 127, 140 |
| LoopTool for parallelization | 176 |
| LoopTool reporter | 163 |
| -lpthread | 157, 158 |
| lseek(2) | 147 |
| -lthread | 157, 158 |
| LWPs,Seelightweight processes |
M
| |
| main() | 234 |
| malloc(3C) | 16 |
| Mandelbrot program | 164 |
| MAP_NORESERVE | 62 |
| MAP_SHARED | 124 |
| memory |
| ......global | 159 |
| ......ordering, relaxed | 242 |
| ......strongly ordered | 241 |
| mmap(2) | 62, 124 |
| monitor, code | 229, 231 |
| mprotect(2) | 63, 203 |
| MT-Safe libraries | 153 |
| multiple-readers, single-writer locks | 198 |
| multiplexing with LWPs | 236 |
| multiprocessors | 239 to 244 |
| multithreading |
| ......defined | 2 |
| mutex Seemutual exclusion locks |
| mutex_init(3T) | 220, 221 |
| mutex_trylock(3T) | 232 |
| mutual exclusion locks | 69 to 86, 122, 142 |
N
| |
| NDEBUG | 104 |
| netdir | 154 |
| netselect | 154 |
| |
| nice(2) | 128, 129 |
| nondetached threads | 15, 33 |
| nonsequential I/O | 146 |
| null |
| .....procedures | 158 |
| .....threads | 63, 203 |
P
| |
| P operation | 106 |
| parallel |
| .....algorithms | 244 |
| .....array computation | 237 |
| Pascal | 161 |
| PC | 6 |
| PC_GETCID | 128 |
| PC_GETCLINFO | 128 |
| PC_GETPARMS | 128 |
| PC_SETPARMS | 128 |
| per-process signal handler | 132 |
| per-thread signal handler | 132 |
| Peterson's Algorithm | 242 |
| PL/1 language | 134 |
| portability | 70 |
| POSIX 1003.4a | 3 |
| pread(2) | 145, 147 |
| printf problem | 228 |
| printf(3S) | 140 |
| priocntl(2) | 128, 129 |
| priority | 6, 127, 128, 129, 236 |
| .....finding for a thread | 209 |
| .....inheritance | 200, 208, 209 |
| .....range | 209 |
| .....and scheduling | 209 |
| .....setting for a thread | 209 |
| process |
| .....terminating | 34 |
| .....traditional UNIX | 1 |
| producer/consumer problem | 116, 221, 241 |
| profil(2) | 126 |
| profiling an LWP | 126 |
| programmer-allocated stack | 62, 63, 203, 204 |
| prolagen | 106 |
| pthread.h | 155 |
| pthread_atfork(3T) | 33 |
| pthread_attr_getdetachstate(3T) | 49 |
| pthread_attr_getinheritsched(3T) | 56 |
| pthread_attr_getschedparam(3T) | 58 |
| pthread_attr_getschedpolicy(3T) | 54 |
| pthread_attr_getscope(3T) | 52 |
| pthread_attr_getstackaddr(3T) | 67 |
| pthread_attr_getstacksize(3T) | 61 |
| pthread_attr_init(3T) | 45 |
| pthread_attr_setdetachstate(3T) | 47 |
| pthread_attr_setinheritsched(3T) | 55 |
| pthread_attr_setschedparam(3T) | 57 |
| pthread_attr_setschedpolicy(3T) | 52 |
| pthread_attr_setscope(3T) | 50 |
| pthread_attr_setstackaddr(3T) | 64 |
| pthread_attr_setstacksize(3T) | 60 |
| pthread_cancel(3T) | 36 |
| pthread_cleanup_pop(3T) | 40 |
| pthread_cleanup_push(3T) | 40 |
| pthread_cond_broadcast(3T) | 94, 99, 102, 133 |
| ......example | 100 |
| pthread_cond_destroy(3T) | 101 |
| pthread_cond_init(3T) | 92 |
| pthread_cond_signal(3T) | 94, 96, 102, 103, 133 |
| |
| .....example | 97 |
| pthread_cond_timedwait(3T) | 98, 142 |
| .....example | 99 |
| pthread_cond_wait(3T) | 94, 102, 103, 133, 142 |
| .....example | 97 |
| pthread_condattr_destroy(3T) | 89 |
| pthread_condattr_getpshared(3T) | 91 |
| pthread_condattr_init(3T) | 88 |
| pthread_condattr_setpshared(3T) | 90 |
| pthread_create(3T) | 13 |
| PTHREAD_CREATE_JOINABLE | 45 |
| pthread_detach(3T) | 17 |
| pthread_equal(3T) | 26 |
| pthread_exit(3T) | 33, 34 |
| pthread_getschedparam(3T) | 30 |
| pthread_getspecific(3T) | 21, 23, 24 |
| pthread_join(3T) | 14, 46, 61, 144 |
| pthread_keycreate(3T) | 18, 24, 25 |
| .....example | 24 |
| pthread_keydelete(3T) | 19 |
| pthread_kill(3T) | 31, 135 |
| pthread_mutex_destroy(3T) | 81 |
| pthread_mutex_init(3T) | 76 |
| pthread_mutex_lock(3T) | 78 |
| .....example | 82, 84, 85, 86 |
| pthread_mutex_trylock(3T) | 80, 84 |
| pthread_mutex_unlock(3T) | 79 |
| .....example | 82, 84, 85, 86 |
| pthread_mutexattr_destroy | 72 |
| pthread_mutexattr_destroy(3T) | 73 |
| pthread_mutexattr_getpshared(3T) | 75 |
| pthread_mutexattr_init(3T) | 72 |
| pthread_mutexattr_setpshared(3T) | 74 |
| pthread_once(3T) | 27 |
| PTHREAD_PROCESS_PRIVATE | 71, 72, 74, 75, 88, 90 |
| PTHREAD_PROCESS_SHARED | 71, 72, 74, 75, 88, 90 |
| PTHREAD_PROCESS_SHARED | 116 |
| PTHREAD_SCOPE_PROCESS | 8, 45, 50 |
| PTHREAD_SCOPE_SYSTEM | 8, 50 |
| pthread_self(3T) | 25 |
| pthread_setcancelstate(3T) | 37 |
| pthread_setcanceltype(3T) | 38 |
| pthread_setprio(3T) | 128, 130 |
| pthread_setschedparam(3T) | 29 |
| pthread_setspecific(3T) | 20, 24, 25 |
| ......example | 24 |
| pthread_sigmask(3T) | 32 |
| pthread_sigsetmask(3T) | 135 |
| PTHREAD_STACK_MIN() | 63 |
| pthread_testcancel(3T) | 39 |
| pthread_yield(3T) | 28 |
| putc(3S) | 147 |
| putc_unlocked(3S) | 147 |
| pwrite(2) | 145, 147 |
R
| |
| read(2) | 146, 147 |
| readers/writer locks | 69, 198 |
| realtime | 237 |
| ......scheduling | 127, 129 |
| red zone | 62, 63, 203 |
| reentrant | 229 |
| ......See also_REENTRANT |
| ......described | 229 |
| ......functions | 151, 152 |
| ......strategies for making | 229 |
| register state | 6 |
| relaxed memory ordering | 242 |
| remote procedure call SeeRPC |
| replacing signal mask | 32 |
| resume execution | 189 |
| RPC | 4, 154, 234 |
| RT,Seerealtime |
| |
| rw_rdlock(3T) | 195 |
| rw_tryrdlock(3T) | 195 |
| rw_trywrlock(3T) | 197 |
| rw_unlock(3T) | 197 |
| rw_wrlock(3T) | 196 |
| rwlock_destroy(3T) | 198 |
| rwlock_init(3T) | 193, 220 |
S
| |
| SA_RESTART | 143 |
| safety, threads interfaces | 149 to 154 |
| scheduling |
| .....class | 127 to 130 |
| .....compute-bound threads | 191 |
| .....priorities | 208 |
| .....realtime | 127, 129 |
| .....system class | 127 |
| .....timeshare | 127, 128 |
| sem_destroy(3T) | 113 |
| sem_init(3T) | 108 |
| .....example | 114 |
| sem_post(3T) | 106, 110 |
| .....example | 115 |
| sem_trywait(3T) | 106, 112 |
| sem_wait(3T) | 111 |
| .....example | 115 |
| sema_init(3T) | 220 |
| sema_post(3T) | 153 |
| semaphores | 69, 106 to 118 |
| .....binary | 107 |
| .....counting, defined | 2 |
| sending signal to thread | 31, 205 |
| sequential algorithms | 244 |
| setjmp(3C) | 127, 139, 140 |
| shared data | 6, 229 |
| shared-memory multiprocessor | 241 |
| SIG_BLOCK | 32 |
| SIG_DFL | 132 |
| SIG_IGN | 132 |
| SIG_SETMASK | 32 |
| SIG_UNBLOCK | 32 |
| sigaction(2) | 132, 133, 143 |
| sigaltstack(2) | 132 |
| SIGFPE | 133, 139 |
| SIGILL | 133 |
| SIGINT | 133, 138, 143 |
| SIGIO | 133, 146 |
| siglongjmp(3C) | 139, 140 |
| signal(2) | 132 |
| signal(5) | 132 |
| signal.h | 31, 32, 155, 205 |
| signals |
| ......access mask | 32, 205 |
| ......add to mask | 32 |
| ......asynchronous | 132 to 138 |
| ......delete from mask | 32 |
| ......handler | 132, 137 |
| ......inheritance | 200 |
| ......masks | 6 |
| ......pending | 189, 200 |
| ......replace current mask | 32 |
| ......send to thread | 31, 205 |
| ......SIG_BLOCK | 32 |
| ......SIG_SETMASK | 32 |
| ......SIG_UNBLOCK | 32 |
| ......SIGSEGV | 61 |
| ......stack | 132 |
| ......unmasked and caught | 142 |
| sigprocmask(2) | 135 |
| SIGPROF | 125 |
| SIGSEGV | 61, 133 |
| sigsend(2) | 132 |
| sigsetjmp(3C) | 140 |
| sigtimedwait(2) | 137 |
| SIGVTALRM | 125 |
| sigwait(2) | 135, 137, 138, 140 |
| SIGWAITING | 131 |
| single-threaded |
| ......assumptions | 225 |
| ......code | 70 |
| ......defined | 2 |
| ......processes | 124 |
| size of stack | 60, 62, 201, 203, 204 |
| stack | 234, 237 |
| |
| .....address | 64, 201 |
| .....boundaries | 61 |
| .....creation | 64, 201 |
| .....custom | 203 |
| .....deallocation | 203 |
| .....minimum size | 62, 203 |
| .....overflows | 62 |
| .....parameters | 16 |
| .....pointer | 6 |
| .....programmer-allocated | 62, 63, 203, 204 |
| .....red zone | 62, 63, 203 |
| .....returning a pointer to | 151 |
| .....size | 60, 62, 201, 203, 204 |
| stack_base | 64, 201 |
| stack_size | 60, 201 |
| standard I/O | 147 |
| standards | 3 |
| start_routine | 201 |
| static storage | 159, 225 |
| stdio | 22, 157 |
| store buffer | 243 |
| storing thread key value | 21, 208 |
| streaming a tape drive | 145 |
| strongly ordered memory | 241 |
| strtoaddr | 154 |
| suspending a new thread | 201 |
| swap space | 62 |
| synchronization objects | 69 to 118 |
| .....condition variables | 69, 87 to 105 |
| .....mutex locks | 69 to 86 |
| .....readers/writer locks | 198 |
| .....semaphores | 69, 106 to 116, 216 to 222 |
| synchronous I/O | 144, 145 |
| system calls |
| .....handling errors | 226 |
| .....and LWPs | 237 |
| system scheduling class | 127 |
T
| |
| tape drive, streaming | 145 |
| terminating |
| ......a process | 34 |
| ......threads | 15 |
| THR_BOUND | 202 |
| thr_continue(3T) | 201 |
| thr_create(3T) | 200, 203, 208 |
| THR_DAEMON | 202 |
| THR_DETACHED | 201 |
| thr_exit(3T) | 202, 205 |
| thr_getconcurrency(3T) | 191 |
| thr_getprio(3T) | 209 |
| thr_getspecific(3T) | 208 |
| thr_join(3T) | 206 |
| thr_keycreate(3T) | 207 |
| thr_kill(3T) | 153 |
| thr_min_stack(3T) | 201, 203 |
| THR_NEW_LWP | 191, 202, 238 |
| thr_self(3T) | 204 |
| thr_setconcurrency(3T) | 190, 202, 237, 238 |
| thr_setprio(3T) | 209 |
| thr_setspecific(3T) | 208 |
| thr_sigsetmask(3T) | 153 |
| THR_SUSPENDED | 201 |
| thr_yield(3T) | 204, 233 |
| Thread Analyzer main window | 166 |
| Thread Analyzer tool | 163 |
| thread.h | 155 |
| thread-directed signal | 137 |
| thread-private storage | 6 |
| threads |
| ......compute-bound | 191 |
| ......concurrency Seeconcurrency |
| ......creating | 12 to 15, 200 to 203, 234, 238 |
| ......daemon | 202 |
| ......defined | 2 |
| ......detached | 15, 48, 201 |
| ......exit codes | 15 |
| ......identifiers | 15, 25, 26, 27, 33, 201, 202, 204 |
| ......initial | 34 |
| ......joining | 14, 34, 206 |
| ......keys Seekeys |
| |
| .....library | 155, 235 |
| .....lightweight processes Seelightweightprocesses |
| .....nondetached | 15, 33 |
| .....null | 63, 203 |
| .....priority Seepriority |
| .....private data | 18 |
| .....safety | 149 to 154 |
| .....signals Seesignals |
| .....stacks Seestack | 151 |
| .....suspended | 189 |
| .....suspending | 201 |
| .....synchronizing | 69 to 118 |
| .....terminating | 15, 33, 205 |
| .....thread-specific data Seethread-specific data | 226 |
| .....unbound Seeunbound threads |
| .....user-level | 2, 5, 6 |
| thread-specific data | 18 to 25 |
| .....global | 22, 23, 24 |
| .....global into private | 23 |
| .....new storage class | 226 |
| .....private | 22 |
| time slicing | 130 |
| time-out | 99, 215 |
| timeshare scheduling class | 127, 128, 129 |
| tiuser.h | 159 |
| TLI | 154, 159 |
| tools |
| .....adb | 161 |
| .....dbx | 161 |
| .....debugger | 161 |
| .....lock_lint | 83 |
| total store order | 243 |
| trap | 132 |
| TS,Seetimeshare scheduling class |
| TSD,Seethread-specific data |
U
| |
| unbound threads | 127 |
| .....alternate signal stacks | 132 |
| .....caching | 234 |
| .....concurrency | 190, 238 |
| ......defined | 2 |
| ......disadvantage | 237 |
| ......mixing with bound threads | 237 |
| ......priorities | 127, 208 |
| ......reasons not to bind | 234, 237 |
| ......and scheduling | 127, 130 |
| ......andthr_setconcurrency(3T) | 19 0, 238 |
| ......andpthread_setprio(3T) | 128, 130 |
| unistd.h | 155 |
| UNIX | 1, 3, 5, 133, 144, 146, 226 |
| user space | 6 |
| user-level threads | 2, 5, 6 |
| USYNC_PROCESS | 71, 88, 193, 210, 213, 217, 220, 221, 238 |
| USYNC_THREAD | 71, 88, 193, 210, 213, 217, 220 |
V
| |
| V operation | 106 |
| variables |
| ......condition | 69, 87 to 105, 118 |
| ......global | 225, 226 |
| ......primitive | 70 |
| verhogen | 106 |
| vfork(2) | 122 |
W
X
|