Using pthread_cancel when the thread is not the last thread and is canceled
Table 1 defines the actions that are taken when the pthread_cancel request is handled by the signal interface routine, and the cancel causes the thread to terminate. This is the same as when the target thread issues pthread_exit_and_get. The status of the thread is -1, and is available for joining threads.
Step | Thread 1 (initial pthread-creating task, or IPT) | Thread 2 (pthread-created thread) |
---|---|---|
1 | The pthread_cancel request was received and delivered to the signal interface routine. Interception of cancelations must be specified by the mvssigsetup service. | |
2 | Set Status_field in the pthread_exit_and_get service to -1. See pthread_exit_and_get (BPX1PTX, BPX4PTX) — Exit and get a new thread. | |
3 | Now follow the steps in Table 1. |