13.23 wait (3270) (continued)

3301:

If the child process has “stopped” and ...

3302:

If the “SWTED” flag is not set (i.e. the parent hasn’t noticed this child lately) ...

3303:

As an “aide-memoire” set the “SWTED” flag. Set “u.u_ar0[R0]”, “u.u_ar0[R1]” so that the child process status word is returned to the parent;

3309:

The “SWTED” flag was set. This means that the parent, by performing at least two “waits” in succession without any intervening call on “ptrace”, is not very interested in the child. So reset both the “STRC” and the “SWTED” flags and release the child. (Note the use of “setrun” (not “wakeup”) to complement the call on “swtch” (4027)).