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>nn::os::Thread::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 T, typename U, typename Stack&gt;
15<a href="../../../nn/Result/Overview.html">nn::Result</a> TryStart(
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(s) to pass to the function to begin running.</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>Specifies the thread's preferred processor and affinity mask.</td>
80        </tr> </table>
81    </div>
82<h2>Return Values</h2>
83<div class="section">Returns the function's execution result. </div>
84<h2>Description</h2>
85    <div class="section">
86<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>
87<h2>See Also</h2>
88    <div class="section">
89<p class="reference"><a href="../../../nn/os/Thread/Start.html"><CODE>Start</CODE></a><br /> </p>
90    </div>
91  <hr><p>CONFIDENTIAL</p></body>
92</html>
93