thr_suspend(3thread) thr_suspend(3thread)
NAME
thr_suspend - suspend the execution of a thread
SYNOPSIS
cc [options] -Kthread file
#include <thread.h>
int thr_suspend(thread_t target_thread);
Parameters
target_thread thread ID of the thread to be suspended
DESCRIPTION
thr_suspend suspends execution of target_thread. thr_suspend
returns when target_thread is suspended. A concurrent
thr_continue of the same thread may be lost or may take effect
depending on the timing.
If target_thread is already suspended, thr_suspend has no
effect.
A thread may suspend itself.
thr_continue will resume the execution of target_thread.
Return Values
thr_suspend returns zero for success and an error number for
failure, as described below.
Errors
If any of the following conditions occurs, thr_suspend returns
the corresponding value:
ESRCH target_thread cannot be found in the current process
USAGE
We don't recommend using thr_suspend and thr_continue to
synchronize threads. Use synchronization routines instead.
REFERENCES
_lwp_continue(2), _lwp_suspend(2), thr_continue(3thread),
thr_create(3thread), thread(3thread)
Copyright 1994 Novell, Inc. Page 1