1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> 2<html> 3 4<head> 5<META http-equiv="Content-Type" content="text/html; charset=windows-1252"> 6<META name="GENERATOR" content="Microsoft FrontPage 5.0"> 7<META http-equiv="Content-Style-Type" content="text/css"> 8<LINK rel="stylesheet" type="text/css" href="../../CSS/revolution.css"> 9<title>OSCheckActiveThreads</title> 10</head> 11 12<body> 13 14<h1>OSCheckActiveThreads</h1> 15 16<h2>C Specification</h2> 17 18<dl> 19<dd><pre><code>#include <revolution/os.h></code></pre> 20 </dd> 21<dd><pre><code>long OSCheckActiveThreads (void);</code></pre> 22 </dd> 23</dl> 24 25<h2>Arguments</h2> 26 27<p>None.</p> 28 29<h2>Return Values</h2> 30 31<p>Returns the current number of active threads if the function doesn't detect any problems. Otherwise, the function stops the program. </p> 32 33<h2>Description</h2> 34 35<p>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 <code>OSCheckActiveThreads</code> function disables interrupts, traces the active thread queue, and performs checks to see if everything is operating normally. If the <code>OSCheckActiveThreads</code> 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.</p> 36 37 38 39<h2>See Also</h2> 40 41<p><a href="../toc.html#Thread" target="contents">Thread Functions</a>, <a href="../toc.html#ThreadSynchronization" target="contents">Thread Synchronization Functions</a></p> 42 43<h2>Revision History</h2><p></p> 44 45<P>2006/03/01 Initial version.</p> 46 47<hr> 48<P>CONFIDENTIAL</p> 49</BODY> 50</HTML>