_lwp_exit(2) _lwp_exit(2)
NAME
_lwp_exit - terminate the calling LWP
SYNOPSIS
#include <sys/lwp.h>
void _lwp_exit(void);
DESCRIPTION
_lwp_exit terminates execution of the calling lightweight
process (LWP). If the caller is the last LWP associated with
the process, the process is terminated as well. The exit
status in this case is not specified.
If the LWP was not created with the LWP_DETACHED flag set, the
following behavior occurs:
If a sibling LWP is blocked in an _lwp_wait for this
LWP, one such sibling LWP will return from its _lwp_wait
call.
Otherwise, if a sibling LWP is blocked in an _lwp_wait
for any LWP, one such sibling LWP will return from its
_lwp_wait call.
If neither of the previous two conditions holds, the
system will store an indication that the exiting LWP has
terminated.
If the LWP was created with the LWP_DETACHED flag set, this
LWP cannot be waited for, and no record is retained.
If two or more LWPs wait explicitly for the same LWP then one
will succeed and the others will get error ESRCH.
Return Values
_lwp_exit does not return a value.
Errors
None.
USAGE
Exit status is not used for LWPs.
REFERENCES
_lwp_wait(2)
Copyright 1994 Novell, Inc. Page 1
_lwp_exit(2) _lwp_exit(2)
NOTICES
Lightweight processes (LWPs) are internal interfaces and are
subject to change. Their use should be avoided.
Copyright 1994 Novell, Inc. Page 2