Documentation: Fix some typos.

This commit is contained in:
Juha Niskanen 2018-03-22 06:40:58 -06:00 committed by Gregory Nutt
parent 52673b5633
commit 6575480d5e
2 changed files with 8 additions and 10 deletions

View File

@ -1060,7 +1060,7 @@ mount -t vfat /dev/ram1 /tmp
</li>
<li>
NSH will execute the script at <code>/etc/init.d/rcS</code> at start-up (before the
first NSH prompt. After execution of the script, the root FS will look
first NSH prompt). After execution of the script, the root FS will look
like:
<ul><pre>
|--dev/
@ -4561,11 +4561,9 @@ nsh&gt; help
<b>Implementation of Your Command.</b>
For example, if you want to add a new a new command called <code>mycmd</code> to NSH, you would first implement the <code>mycmd</code> code in a function with this prototype:
</p>
<ul></pre>
<ul><pre>
int cmd_mycmd(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv);
</pre></ul>
<p>
The <code>argc</code> and <code>argv</code> are used to pass command line arguments to the NSH command.
Command line parameters are passed in a very standard way: <code>argv[0]</code> will be the name of the command, and <code>argv[1]</code> through <code>argv[argc-1]</code> are the additional arguments provided on the NSH command line.
@ -4587,12 +4585,12 @@ void nsh_output(FAR struct nsh_vtbl_s *vtbl, const char *fmt, &hellip;);
<ul><pre>
int cmd_mycmd(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv)
{
nsh_output(vtbl, &quote;Hello, World!&quote;);
nsh_output(vtbl, &quot;Hello, World!&quot;);
return 0;
}
</pre></ul>
<p>
The prototype for the new command should be placed in <code>apps/examples/nshlib/nsh.h></code>.
The prototype for the new command should be placed in <code>apps/examples/nshlib/nsh.h</code>.
</p>
<p>

View File

@ -1843,7 +1843,7 @@ int posix_spawn_file_actions_init(FAR posix_spawn_file_actions_t *file_actions);
</p>
<p>
Optionally, a Nuttx task or thread can be configured with round-robin or <i>sporadic</i> scheduler.
The round-roben is similar to priority scheduling <i>except</i> that tasks with equal priority and share CPU time via <i>time-slicing</i>.
The round-robin is similar to priority scheduling <i>except</i> that tasks with equal priority and share CPU time via <i>time-slicing</i>.
The time-slice interval is a constant determined by the configuration
setting <code>CONFIG_RR_INTERVAL</code> to a positive, non-zero value.
Sporadic scheduling scheduling is more complex, varying the priority of a thread over a <i>replenishment</i> period.
@ -2221,7 +2221,7 @@ priority of the calling task is returned.
<b>Task Exit Hooks</b>.
<code>atexit()</code> and <code>on_exit()</code> may be use to register callback functions that are executed when a <i>task group</i> terminates.
A task group is the functional analog of a process:
It is a group that consists of the main task thread and of all of the pthreads created by the main task thread or any of the other pthreads within the task broup.
It is a group that consists of the main task thread and of all of the pthreads created by the main task thread or any of the other pthreads within the task group.
Members of a task group share certain resources such as environment variables, file descriptors, <code>FILE</code> streams, sockets, pthread keys and open message queues.
</p>
<blockquote><small>
@ -5704,7 +5704,7 @@ be sent.
NuttX only supports simple threads or tasks running within the same address space.
However, NuttX does support the concept of a <i>task group</i>.
A task group is the functional analog of a process:
It is a group that consists of the main task thread and of all of the pthreads created by the main thread or any of the other pthreads within the task broup.
It is a group that consists of the main task thread and of all of the pthreads created by the main thread or any of the other pthreads within the task group.
Members of a task group share certain resources such as environment variables, file descriptors, <code>FILE</code> streams, sockets, pthread keys and open message queues.
</p>
<blockquote><small>