#include <revolution/os.h>
long OSCheckActiveThreads (void);
None.
Returns the current number of active threads if the function doesn't detect any problems. Otherwise, the function stops the program.
The operating system maintains a linked list of the active threads that are runnable, running, waiting, or asleep. This linked list is called the active thread queue. The OSCheckActiveThreads function disables interrupts, traces the active thread queue, and performs checks to see if everything is operating normally. If the OSCheckActiveThreads function finds a broken link or any other problems, a failure message is displayed and the program stops executing. Because a program error could corrupt the memory space used for thread management, calling this function as an option will help you debug multithreaded programs.
Thread Functions, Thread Synchronization Functions
2006/03/01 Initial version.
CONFIDENTIAL