DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 

_lwp_suspend(S)


_lwp_suspend -- suspend LWP execution

Synopsis

   #include <sys/types.h>
   #include <sys/lwp.h>
   

int _lwp_suspend(lwpid_t target_LWP);

Parameters


target_LWP
LWP ID of the lightweight process (LWP) to be suspended

Description

_lwp_suspend causes suspension of the execution of target_LWP. This suspended state is orthogonal to stopped states resulting from job control or /proc manipulations. The function _lwp_suspend does not return until target_LWP has actually been suspended.

No execution of a suspended LWP is possible. For example, if a signal is posted to a suspended LWP, the handler cannot execute, so the signal remains pending. (The _lwp_kill call in the posting LWP returns normally even if the target LWP is suspended.)

The suspended state and the /proc/debugger stop states are orthogonal.

Return values

_lwp_suspend returns zero for success and an error number for failure, as described below.

Errors

If any of the following conditions is detected, _lwp_suspend( ) returns the corresponding value:

ESRCH
No LWP can be found in the current process with identity target_LWP.

EDEADLK
target_LWP is the calling LWP, and the process has only one LWP.

References

_lwp_continue(S), _lwp_create(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