summaryrefslogtreecommitdiff
path: root/nuttx/Documentation/NuttxPortingGuide.html
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2011-04-07 14:39:55 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2011-04-07 14:39:55 +0000
commitb7527ff1800f938dcadc65ece0abbbe4a69821eb (patch)
tree13a84dfd1b2725250e41f9b7fec0d61bc3671e10 /nuttx/Documentation/NuttxPortingGuide.html
parent0a143e4c2dfae5e5b9e1000fd83ce5d05a84d6aa (diff)
downloadnuttx-b7527ff1800f938dcadc65ece0abbbe4a69821eb.tar.gz
nuttx-b7527ff1800f938dcadc65ece0abbbe4a69821eb.tar.bz2
nuttx-b7527ff1800f938dcadc65ece0abbbe4a69821eb.zip
Add support for kernel-mode threads
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@3478 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/Documentation/NuttxPortingGuide.html')
-rw-r--r--nuttx/Documentation/NuttxPortingGuide.html23
1 files changed, 16 insertions, 7 deletions
diff --git a/nuttx/Documentation/NuttxPortingGuide.html b/nuttx/Documentation/NuttxPortingGuide.html
index 5efc76e6c..b55dc6fd9 100644
--- a/nuttx/Documentation/NuttxPortingGuide.html
+++ b/nuttx/Documentation/NuttxPortingGuide.html
@@ -12,7 +12,7 @@
<h1><big><font color="#3c34ec">
<i>NuttX RTOS Porting Guide</i>
</font></big></h1>
- <p>Last Updated: April 6, 2011</p>
+ <p>Last Updated: April 7, 2011</p>
</td>
</tr>
</table>
@@ -1217,14 +1217,23 @@ The system can be re-made subsequently by just typing <code>make</code>.
<p><b>Prototype</b>: <code>void up_initial_state(FAR _TCB *tcb);</code></p>
<p><b>Description</b>.
- A new thread is being started and a new TCB
- has been created. This function is called to initialize
- the processor specific portions of the new TCB.
+ A new thread is being started and a new TCB has been created.
+ This function is called to initialize the processor specific portions of the new TCB.
</p>
<p>
- This function must setup the initial architecture registers
- and/or stack so that execution will begin at tcb->start
- on the next context switch.
+ This function must setup the initial architecture registers and/or stack so that execution
+ will begin at tcb->start on the next context switch.
+</p>
+<p>
+ This function may also need to set up processor registers so that the new thread executes
+ with the correct privileges.
+ If <code>CONFIG_NUTTX_KERNEL</code> has been selected in the NuttX configuration,
+ then special initialization may need to be performed depending on the task type specified
+ in the TCB's flags field:
+ Kernel threads will require kernel-mode privileges;
+ User tasks and pthreads should have only user-mode privileges.
+ If <code>CONFIG_NUTTX_KERNEL</code> has <i>not</i> been selected,
+ then all threads should have kernel-mode privileges.
</p>
<h3><a name="upcreatestack">4.1.4 <code>up_create_stack()</code></a></h3>