Changes between Version 63 and Version 64 of processus_thread


Ignore:
Timestamp:
Dec 8, 2017, 6:15:42 PM (4 years ago)
Author:
alain
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • processus_thread

    v63 v64  
    135135
    136136 * 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).
    137  * 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:
     137 * After taking the "join_lock", the T thread registers its exit value in the T thread "join_value" field, and test the JOIN_DONE flag in the T thread "flags" field:
    138138   * 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), reset the JOIN_DONE flag, releases the "join_lock" in T thread, and exit as described in the DETACHED case.
    139139   * If the JOIN_DONE flag is not set, the T thread T arrived first: the T thread set the BLOCKED_JOIN bit in the T thread "blocked" field, releases the "join"lock", and deschedules.
    140140 * After taking the "join_lock", the PT thread test the BLOCKED_JOIN bit in T thread.
    141    * If the BLOCKED_JOIN bit 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.
     141   * If the BLOCKED_JOIN bit 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 i "join_value" field, releases the "join_lock" in T thread, and continue.
    142142   * If the BLOCKED_JOIN bit 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, sets the BLOCKED_EXIT bit in the PT thread "blocked" field, releases the "join_lock" in the T thread, and deschedules.
    143143