_lwp_create() causes creation of a new light-weight process, or LWP, and adds it to the current process. The
context argument specifies the initial execution context for the new LWP including signal mask, stack, and machine registers.
The following flags affect the creation of the new LWP:
LWP_DETACHED
The LWP is created detached. The resources associated with a detached LWP will be automatically reclaimed by the system when the LWP exits. Otherwise, a terminated LWP's resources will not be reclaimed until its status is reported to another LWP via
_lwp_wait(2).
LWP_SUSPENDED
The LWP is created suspended, and will not begin execution until it is resumed by another LWP via
_lwp_continue(2).
The LWP ID of the new LWP is stored in the location pointed to by
new_lwp.