_lwp_exit(S)
_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(S)
Notices
Lightweight processes (LWPs) are internal interfaces and are subject
to change. Their use should be avoided.
© 2005 The SCO Group, Inc. All rights reserved.
SCO OpenServer Release 6.0.0 - 01 June 2005