Professional Group Tec. Doc.07121901 Author- 万一飞
7.6.6 PTHREAD_TRACE_NP ................................................................................ 42
7.6.7 sched_yield ...................................................................................................... 42
7.7 线程操作 API -- Operation Thread API .................................................................. 45
7.7.1 pthread_create() 创建线程 ........................................................................... 45
7.7.2 pthread_exit 结束线程 ................................................................................. 48
7.7.3 pthread_join 等待线程结束并释放线程资源 ............................................... 50
7.7.4 pthread_join_np 等待线程结束 ................................................................... 52
7.7.5 pthread_extendedjoin_np 根据一些扩展条件等待线程 ............................ 52
7.7.6 pthread_cancel 取消线程 ............................................................................... 52
8 线程特有数据 API Thread specific storage API ................................................................. 54
8.1 pthread_key_create ..................................................................................................... 55
8.2 pthread_key_delete ..................................................................................................... 56
8.3 pthread_setspecific ...................................................................................................... 57
8.4 pthread_getspecific ..................................................................................................... 59
9 取消线程 API Thread cancellation API ............................................................................. 60
9.1 pthread_cancel ............................................................................................................ 60
9.2 pthread_cleanup_peek_np ........................................................................................... 60
9.3 pthread_cleanup_pop .................................................................................................. 60
9.4 pthread_cleanup_push ................................................................................................. 60
9.5 pthread_getcancelstate_np .......................................................................................... 60
9.6 pthread_setcancelstate ................................................................................................. 60
9.7 pthread_setcanceltype ................................................................................................. 60
9.8 pthread_test_exit_np ................................................................................................... 60
9.9 pthread_testcancel ....................................................................................................... 60
10 条件变量的 API ............................................................................................................. 60
10.1 pthread_cond_init ........................................................................................................ 61
10.2 pthread_cond_wait ...................................................................................................... 62
10.3 pthread_cond_signal ................................................................................................... 65
10.4 pthread_cond_timedwait ............................................................................................. 67
10.5 pthread_cond_broadcast .............................................................................................. 70
10.6 pthread_cond_destroy ................................................................................................. 70
10.7 pthread_condattr_destroy ............................................................................................ 71
10.8 pthread_condattr_getpshared ...................................................................................... 71
10.9 pthread_condattr_init .................................................................................................. 71
10.10 pthread_condattr_setpshared ................................................................................... 71
10.11 pthread_get_expiration_np ...................................................................................... 71
11 读/写锁的同步 API Read/write lock synchronization API ......................................... 71
11.1 pthread_rwlock_destroy .............................................................................................. 71
11.2 pthread_rwlock_init .................................................................................................... 71
11.3 pthread_rwlock_rdlock ............................................................................................... 71
11.4 pthread_rwlock_timedrdlock_np ................................................................................ 71
11.5 pthread_rwlock_timedwrlock_np................................................................................ 71
11.6 pthread_rwlock_tryrdlock ........................................................................................... 71
11.7 pthread_rwlock_trywrlock .......................................................................................... 71
11.8 pthread_rwlock_unlock ............................................................................................... 71