Manpages

NAME

_lwp_detach − detach an LWP

SYNOPSIS

#include <sys/lwp.h>

int _lwp_detach(lwpid_t target_lwp);

DESCRIPTION

The _lwp_detach() function marks the LWP specified by target_lwp as being a detached LWP. The effect is the same as if target_lwp had been created using the LWP_DETACHED flag (see _lwp_create(2)).

The target_lwp must be a non-detached LWP within the same process as the calling LWP.

RETURN VALUES

Upon successful completion, 0 is returned. A non-zero value indicates an error.

ERRORS

If any of the following conditions occur, _lwp_detach() fails and returns the corresponding value:
EINVAL

The LWP with the ID specified by target_lwp is already detached.

ESRCH

No LWP with the ID specified by target_lwp can be found in the current process.

ATTRIBUTES

See attributes(5)
for descriptions of the following attributes:

SEE ALSO

_lwp_create(2), _lwp_exit(2), _lwp_wait(2), attributes(5)