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 &lt;nn/os.h&gt;
14template &lt;typename Stack&gt;
15<a href="../../../nn/Result/Overview.html">nn::Result</a> TryStart(
16     void(*)() f,
17     Stack & stack,
18     s32 priority = DEFAULT_THREAD_PRIORITY,
19     s32 coreNo = CORE_NO_USE_PROCESS_VALUE
20);
21</pre>
22    </div>
23<h2>Template Arguments</h2>
24    <div class="section">
25      <table class="arguments">
26        <thead>
27          <tr>
28<th>Name</th>
29<td>Description</td>
30          </tr>
31        </thead>
32        <tr>
33<th>Stack</th>
34<td>Type representing stacks.</td>
35        </tr> </table>
36    </div>
37<h2>Arguments</h2>
38    <div class="section">
39      <table class="arguments">
40        <thead>
41          <tr>
42            <td width="15" />
43<th>Name</th>
44<td>Description</td>
45          </tr>
46        </thead>
47        <tr>
48<td>in</td>
49<th>f</th>
50<td>Pointer to the function to begin running.</td>
51        </tr>
52        <tr>
53<td>in</td>
54<th>stack</th>
55<td>Object representing the stack region.</td>
56        </tr>
57        <tr>
58<td>in</td>
59<th>priority</th>
60<td>Priority of the thread.</td>
61        </tr>
62        <tr>
63<td>in</td>
64<th>coreNo</th>
65<td>Specifies the thread's preferred processor and affinity mask.</td>
66        </tr> </table>
67    </div>
68<h2>Return Values</h2>
69<div class="section">Returns the function's execution result. </div>
70<h2>Description</h2>
71    <div class="section">
72<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>.
73            </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/06/22</dt>
82<dd>Added a note about specifying a preferred processor.<br />
83        </dd>
84        <dt>2010/01/07</dt>
85<dd>Initial version.<br />
86        </dd>
87      </dl>
88    </div>
89  <hr><p>CONFIDENTIAL</p></body>
90</html>
91