148 | | * After taking the "join_lock", the T thread (running the thread_exit() function) test the JOIN_DONE flag in T thread. If this flag is set, the PT thread arrived first: the T thread register its exit value in the PT thread "join_value" field, set the EXIT_DONE flag in the PT thread, reset the BLOCKED_EXIT bit in PT thread (using the extended pointer stored in the "join_xp" field), release the "join_lock", and exit as described for the DETACHED case. |
| 148 | * After taking the "join_lock", the T thread test the JOIN_DONE flag in T thread. If this flag is set, the PT thread arrived first: the T thread register its exit value in the PT thread "join_value" field, set the EXIT_DONE flag in the PT thread, reset the BLOCKED_EXIT bit in PT thread (using the extended pointer stored in the "join_xp" field), release the "join_lock", and exit as described for the DETACHED case. |
150 | | * After taking the "join_lock", the PT thread (running the thread_join() function) test the EXIT_DONE flag in PT thread. If this flag is set, the T thread arrived first: the PT thread |
151 | | reset the BLOCKED_EXIT bit in the T thread "blocked" field, get the exit value in the "join_value" field, reset the "join_lock" in T thread, and continue. |
| 150 | * After taking the "join_lock", the PT thread test the EXIT_DONE flag in PT thread. If this flag is set, the T thread arrived first: the PT thread reset the BLOCKED_EXIT bit in the T thread "blocked" field, get the exit value in the "join_value" field, reset the "join_lock" in T thread, and continue. |