1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 2<html xml:lang="en-US" lang="en-US" xmlns="http://www.w3.org/1999/xhtml"> 3 <head> 4 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 5 <meta http-equiv="Content-Style-Type" content="text/css" /> 6 <link rel="stylesheet" href="../../../css/manpage.css" type="text/css" /> 7<title>StartUsingAutoStack</title> 8 </head> 9 <body> 10<h1><CODE><a href="../../../nn/Overview.html">nn</a>::<a href="../../../nn/os/Overview.html">os</a>::<a href="../../../nn/os/Thread/Overview.html">Thread</a>::StartUsingAutoStack</CODE> Member Function</h1> 11<h2>Syntax</h2> 12 <div class="section"> 13<pre class="definition">#include <nn/os.h> 14void StartUsingAutoStack( 15 void(*)() f, 16 size_t stackSize, 17 s32 priority = DEFAULT_THREAD_PRIORITY, 18 s32 coreNo = CORE_NO_USE_PROCESS_VALUE 19); 20</pre> 21 </div> 22<h2>Arguments</h2> 23 <div class="section"> 24 <table class="arguments"> 25 <thead> 26 <tr> 27 <td width="15" /> 28<th>Name</th> 29<td>Description</td> 30 </tr> 31 </thead> 32 <tr> 33<td>in</td> 34<th>f</th> 35<td>Pointer to the function to begin running.</td> 36 </tr> 37 <tr> 38<td>in</td> 39<th>stackSize</th> 40<td>The stack size. Must be a positive integer multiple of 4096.</td> 41 </tr> 42 <tr> 43<td>in</td> 44<th>priority</th> 45<td>Priority of the thread.</td> 46 </tr> 47 <tr> 48<td>in</td> 49<th>coreNo</th> 50<td>Specifies the thread's preferred processor and affinity mask.</td> 51 </tr> </table> 52 </div> 53<h2>Return Values</h2> 54 <div class="section"> 55None. 56 </div> 57<h2>Description</h2> 58 <div class="section"> 59<p>Initializes and runs a thread.</p><p>Automatically allocates a stack of the specified size, and automatically destroys it when the thread terminates.</p><p><B>Note:</B>In the present implementation, the application cannot specify a preferred processor. You MUST specify <CODE>CORE_NO_USE_PROCESS_VALUE</CODE>. 60 </p></div> 61<h2>Revision History</h2> 62 <div class="section"> 63 <dl class="history"> 64 <dt>2011/06/22</dt> 65<dd>Added a note about specifying a preferred processor.<br /> 66 </dd> 67 <dt>2010/03/28</dt> 68<dd>Clarified restrictions on <SPAN class="argument">stackSize</SPAN> argument.<br /> 69 </dd> 70 <dt>2010/01/07</dt> 71<dd>Initial version.<br /> 72 </dd> 73 </dl> 74 </div> 75 <hr><p>CONFIDENTIAL</p></body> 76</html> 77