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>Start</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>::Start</CODE> Member Function</h1> 11<h2>Syntax</h2> 12 <div class="section"> 13<pre class="definition">#include <nn/os.h> 14template <typename T, typename U, typename Stack> 15void Start( 16 void(*)(T) f, 17 U param, 18 Stack & stack, 19 s32 priority = DEFAULT_THREAD_PRIORITY, 20 s32 coreNo = CORE_NO_USE_PROCESS_VALUE 21); 22</pre> 23 </div> 24<h2>Template Arguments</h2> 25 <div class="section"> 26 <table class="arguments"> 27 <thead> 28 <tr> 29<th>Name</th> 30<td>Description</td> 31 </tr> 32 </thead> 33 <tr> 34<th>T</th> 35<td>Data type of argument(s) of the function to run (this type must be copyable).</td> 36 </tr> 37 <tr> 38<th>U</th> 39<td>A type that can be converted to <SPAN class="argument">T</SPAN>.</td> 40 </tr> 41 <tr> 42<th>Stack</th> 43<td>Type representing stacks</td> 44 </tr> </table> 45 </div> 46<h2>Arguments</h2> 47 <div class="section"> 48 <table class="arguments"> 49 <thead> 50 <tr> 51 <td width="15" /> 52<th>Name</th> 53<td>Description</td> 54 </tr> 55 </thead> 56 <tr> 57<td>in</td> 58<th>f</th> 59<td>Pointer to the function to begin running.</td> 60 </tr> 61 <tr> 62<td>in</td> 63<th>param</th> 64<td>Argument to pass to the function that begins execution.</td> 65 </tr> 66 <tr> 67<td>in</td> 68<th>stack</th> 69<td>Object representing the stack region</td> 70 </tr> 71 <tr> 72<td>in</td> 73<th>priority</th> 74<td>Priority of the thread.</td> 75 </tr> 76 <tr> 77<td>in</td> 78<th>coreNo</th> 79<td>Preferred processor for the thread.</td> 80 </tr> </table> 81 </div> 82<h2>Return Values</h2> 83 <div class="section"> 84None. 85 </div> 86<h2>Description</h2> 87 <div class="section"> 88<p>Initializes and runs a thread.</p><p>Initializes a thread using a stack prepared by the user application, then starts the thread. The stack region must be maintained until it is confirmed that the thread has been terminated.</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>. 89 </p></div> 90<h2>Revision History</h2> 91 <div class="section"> 92 <dl class="history"> 93 <dt>2011/06/22</dt> 94<dd>Added a note about specifying a preferred processor.<br /> 95 </dd> 96 <dt>2010/01/07</dt> 97<dd>Initial version.<br /> 98 </dd> 99 </dl> 100 </div> 101 <hr><p>CONFIDENTIAL</p></body> 102</html> 103