_lwp_wait() suspends execution of the calling LWP until the LWP specified by
wlwp terminates. The specified LWP must not be detached. If
wlwp is 0, then
_lwp_wait() waits for any undetached LWP in the current process.
If
rlwp is not
NULL, then it points to the location where the LWP ID of the exited LWP is stored.