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>TryStart</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>::TryStart</CODE> Member Function</h1> 11<h2>Syntax</h2> 12 <div class="section"> 13 <pre class="definition">#include <nn/os.h> 14 15template <typename Stack> 16<a href="../../../nn/Result/Overview.html">nn::Result</a> TryStart( 17 void(*)() f, 18 Stack & stack, 19 <a href="../../../nn_types/s32.html">s32</a> priority = DEFAULT_THREAD_PRIORITY, 20 <a href="../../../nn_types/s32.html">s32</a> 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>Stack</th> 35<td>Type representing stacks.</td> 36 </tr> </table> 37 </div> 38<h2>Arguments</h2> 39 <div class="section"> 40 <table class="arguments"> 41 <thead> 42 <tr> 43 <td width="15" /> 44<th>Name</th> 45<td>Description</td> 46 </tr> 47 </thead> 48 <tr> 49<td>in</td> 50<th>f</th> 51<td>Pointer to the function to begin running.</td> 52 </tr> 53 <tr> 54<td>in</td> 55<th>stack</th> 56<td>Object representing the stack region.</td> 57 </tr> 58 <tr> 59<td>in</td> 60<th>priority</th> 61<td>Priority of the thread.</td> 62 </tr> 63 <tr> 64<td>in</td> 65<th>coreNo</th> 66<td>Preferred processor for the thread.</td> 67 </tr> </table> 68 </div> 69<h2>Return Values</h2> 70<div class="section">Returns the function's execution result. </div> 71<h2>Description</h2> 72 <div class="section"> 73<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></div> 74<h2>See Also</h2> 75 <div class="section"> 76<p class="reference"><a href="../../../nn/os/Thread/Start.html"><CODE>Start</CODE></a><br /> </p> 77 </div> 78<h2>Revision History</h2> 79 <div class="section"> 80 <dl class="history"> 81 <dt>2011/09/01</dt> 82<dd>Deleted the note about specifying a preferred processor.<br /> 83 </dd> 84 <dt>2011/06/22</dt> 85<dd>Added a note about specifying a preferred processor.<br /> 86 </dd> 87 <dt>2010/01/07</dt> 88<dd>Initial version.<br /> 89 </dd> 90 </dl> 91 </div> 92 <hr><p>CONFIDENTIAL</p></body> 93</html> 94