In contrast, the thread that is sleeping can be suspended as explained below. Note that the running thread can only be suspended by itself and in this case, a scheduling mechanism should be activated. The resumed thread is appended to the end of the ready list. Resuming a ready, new, terminated, and sleeping thread has no effect and is not considered and error. Obviously, a thread cannot resume itself.
Virtual timer decrements only when a host process runs in the user mode.
Therefore in real time the thread that have put itself to sleep may sleep more than usec. The function will return the thread's id on success and -1 otherwise. If this function is called for the terminated thread, it deletes the thread from the system. Make sure that the tar file can be extracted and that the extracted files do compile. Design your program carefully before you start writing.