Changes between Version 59 and Version 60 of processus_thread


Ignore:
Timestamp:
Dec 8, 2017, 1:37:44 PM (7 years ago)
Author:
alain
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • processus_thread

    v59 v60  
    136136
    137137 * Both the T thread (executing the thread_exit() function), and the PT thread (executing the thread_join() function) try to take the "join_lock" implemented in the T thread descriptor (the "join_lock" in the PT thread is not used).
    138  * 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.
    139  * If the JOIN_DONE flag is not set, the thread T arrived first: The T thread register its exit value in the PT thread "join_value" field, release the "join"lock", blocks on the BLOCKED_JOIN and deschedules.
    140  * 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.
    141  * If the EXIT_DONE flag is not set, the PT thread arrived first: the PT thread register its extended pointer in the T thread "join_xp" field, set the JOIN_DONE flag in the T thread, releases the "join_lock" in the T thread, blocks on the BLOCKED_EXIT bit, and deschedules.
     138 * After taking the "join_lock", the T thread register its exit value in the T thread "join_value" field, and test the JOIN_DONE flag in the T thread "flags" field:
     139   * If the JOIN_DONE flag is set, the PT thread arrived first and is blocked: the T thread reset the  BLOCKED_EXIT bit in the PT thread (using the extended pointer stored in the "join_xp" field), releases the "join_lock" in T thread, and exit as described for the DETACHED case.
     140   * If the JOIN_DONE flag is not set, the T thread T arrived first: The T thread set the EXIT_DONE flag in the T thread "flags"field, release the "join"lock", set the BLOCKED_JOIN bit in the T thread "blocked" field, and deschedules.
     141 * After taking the "join_lock", the PT thread test the EXIT_DONE flag in PT thread.
     142   * If the EXIT_DONE flag is set, the T thread arrived first and is blocked: the PT thread reset the BLOCKED_JOIN bit in the T thread, get the exit value from the T thread the "join_value" field, releases the "join_lock" in T thread, and continue.
     143 * If the EXIT_DONE flag is not set, the PT thread arrived first: the PT thread register its extended pointer in the T thread "join_xp" field, set the JOIN_DONE flag in the T thread, releases the "join_lock" in the T thread, sets the BLOCKED_EXIT bit in the PT thread "blocked" field, and deschedules.
    142144
    143145== __6) Process destruction__ ==