Suspends the execution of a specified thread and returns when the target thread is suspended.
#include <nks/thread.h> int NXThreadSuspend ( NXThreadId_t tid);
(IN) Specifies the ID of the thread to suspend.
If successful, returns 0; otherwise, returns a nonzero error code:
The thread that calls NXThreadSuspend blocks until the suspension is granted, which might not be immediately. For example:
A thread can disable suspension by calling nxCancelDisable, which stays in effect until the thread calls nxCancelEnable.
If a thread has acquired a lock, LibC prohibits suspension until the lock is released.
Calling NXThreadSuspend on a thread that is already suspended has no effect.
A suspended thread can be resumed by calling NXThreadContinue.
IMPORTANT:A thread cannot suspend itself.