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