OSCheckActiveThreads

Syntax

#include <cafe/os.h>

long OSCheckActiveThreads (void);

Parameters

None.

Return Values

Returns the current number of active threads if the function does not detect any issues. Otherwise, the function stops the program.

Description

The operating system maintains a linked list of the active threads that are runnable, running, waiting, or asleep. This linked list is referred to as 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 issue, a failure message is displayed and the program stops executing. Because a program error could cause the memory space used for thread management to become corrupted, calling this function may help you debug multithreaded programs.

Do Not Call From

None.

Revision History

2013/05/08 Automated cleanup pass.
2012/08/01 Cleanup pass.
2010/08/30 Initial version.


CONFIDENTIAL