_lwp_exit() terminates the calling LWP. If it is the last LWP in the process, the process exits with a status of 0. If the LWP was not created in a detached state, then the system will not reclaim its LWP ID until its status is reported to another LWP in the process via
_lwp_wait(2).