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>TryStartUsingAutoStack</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>::TryStartUsingAutoStack</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> 15<a href="../../../nn/Result/Overview.html">nn::Result</a> TryStartUsingAutoStack( 16 void(*)(T) f, 17 U param, 18 size_t stackSize, 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> </table> 41 </div> 42<h2>Arguments</h2> 43 <div class="section"> 44 <table class="arguments"> 45 <thead> 46 <tr> 47 <td width="15" /> 48<th>Name</th> 49<td>Description</td> 50 </tr> 51 </thead> 52 <tr> 53<td>in</td> 54<th>f</th> 55<td>Pointer to the function to begin running.</td> 56 </tr> 57 <tr> 58<td>in</td> 59<th>param</th> 60<td>Argument(s) to pass to the function to begin running.</td> 61 </tr> 62 <tr> 63<td>in</td> 64<th>stackSize</th> 65<td>The stack size. Must be a positive integer multiple of 4096.</td> 66 </tr> 67 <tr> 68<td>in</td> 69<th>priority</th> 70<td>Priority of the thread.</td> 71 </tr> 72 <tr> 73<td>in</td> 74<th>coreNo</th> 75<td>Specifies the thread's preferred processor and affinity mask.</td> 76 </tr> </table> 77 </div> 78<h2>Return Values</h2> 79<div class="section">Returns the function's execution result. </div> 80<h2>Description</h2> 81 <div class="section"> 82<p>Tries to initialize and run a thread.</p><p>This function attempts to initialize and run a thread; it returns an error if it fails because of insufficient resources or for any other such reason.</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>. 83 </p></div> 84<h2>See Also</h2> 85 <div class="section"> 86<p class="reference"><a href="../../../nn/os/Thread/StartUsingAutoStack.html"><CODE>StartUsingAutoStack</CODE></a><br /> </p> 87 </div> 88<h2>Revision History</h2> 89 <div class="section"> 90 <dl class="history"> 91 <dt>2011/06/22</dt> 92<dd>Added a note about specifying a preferred processor.<br /> 93 </dd> 94 <dt>2010/03/28</dt> 95<dd>Clarified restrictions on <SPAN class="argument">stackSize</SPAN> argument.<br /> 96 </dd> 97 <dt>2010/01/07</dt> 98<dd>Initial version.<br /> 99 </dd> 100 </dl> 101 </div> 102 <hr><p>CONFIDENTIAL</p></body> 103</html> 104