N64® Functions Menu

al - Audio Library Functions
gDP - DP GBI Macros
gdSP - General GBI Macros
gSP - SP GBI Macros
gt - Turbo Microcode RDP
gu - Graphics Utilities
Math - Math Functions
nuSys - NuSystem
os - N64 Operating System
sp - Sprite Library Functions
uh - Host to Target IO
64DD - N64 Disk Drive

Nintendo® Confidential

   

osStopThread

Format
#include <ultra64.h>
void osStopThread(OSThread *t);


What This Function Does
It suspends the given thread (t), preventing it from becoming runnable until a subsequence call to osStartThread on the same thread.

If t is NULL, the running thread is stopped and the dispatcher is invoked to run the new highest priority runnable thread. If t is not the invoking thread, it should either be on the run queue or on a queue of threads blocked to send or receive a message. In these cases, osStopThread simply removes the thread from the queue it is on. Call the osStartThread function to restore the thread to that queue.

This method of implementation, though efficient, has some side effects. Intuitively, you might expect the following sequence to have no effect:

osStopThread(t);
osStartThread(t);


However, because the thread (t) is removed and then reinserted into the queue, it will be moved after all of the other threads of the same priority, and cause a change in behavior.

See Also
osCreateThread
osGetThreadId
osGetThreadPri
osStartThread
osYieldThread



Nintendo® Confidential

Warning: all information in this document is confidential and covered by a non-disclosure agreement. You are responsible for keeping this information confidential and protected. Nintendo will vigorously enforce this responsibility.


Copyright © 1998
Nintendo of America Inc. All rights reserved
Nintendo and N64 are registered trademarks of Nintendo
Last updated January 1998