doc: Edit nanokernel_tasks for consistency and ReST :dfn: syntax
Corrected an "is is" and other minor punctuation + grammatical edits. Change-Id: I26f51809215a8ac77a20bc9d424e6a806e29ee50 Signed-off-by: L.S. Cook <leonax.cook@intel.com>
This commit is contained in:
parent
6cd159674a
commit
c6be6f271c
1 changed files with 20 additions and 20 deletions
|
@ -6,19 +6,19 @@ Task Services
|
||||||
Concepts
|
Concepts
|
||||||
********
|
********
|
||||||
|
|
||||||
A task is a preemptible thread of execution that implements a portion of
|
A :dfn:`task` is a preemptible thread of execution that implements a portion of
|
||||||
an application's processing. It is is normally used to perform processing that
|
an application's processing. It is normally used to perform processing that is
|
||||||
is too lengthy or complex to be performed by a fiber or an ISR.
|
too lengthy or too complex to be performed by a fiber or an ISR.
|
||||||
|
|
||||||
A nanokernel application can define only a single application task, known
|
A nanokernel application can define a single application task, known as the
|
||||||
as the *background task*, which executes when there is no fiber or ISR
|
*background task*, which can execute only when no fiber or ISR needs to
|
||||||
that needs to execute. The entry point function for the background task
|
execute. The entry point function for the background task is :code:`main()`,
|
||||||
is :c:func:`main()`, and must be supplied by the application.
|
and it must be supplied by the application.
|
||||||
|
|
||||||
.. note::
|
.. note::
|
||||||
The background task is very different from the tasks used by a microkernel
|
The background task is very different from the tasks used by a microkernel
|
||||||
application; for more information see
|
application; for more information see :ref:`microkernel_tasks`.
|
||||||
:ref:`Microkernel Task Services <microkernel_tasks>`.
|
|
||||||
|
|
||||||
Task Lifecycle
|
Task Lifecycle
|
||||||
==============
|
==============
|
||||||
|
@ -26,21 +26,21 @@ Task Lifecycle
|
||||||
The kernel automatically starts the background task during system
|
The kernel automatically starts the background task during system
|
||||||
initialization.
|
initialization.
|
||||||
|
|
||||||
Once the background task is started it executes forever. If the task attempts
|
Once the background task is started, it executes forever. If the task attempts
|
||||||
to terminate by returning from :c:func:`main()`, the kernel puts the task into
|
to terminate by returning from :code:`main()`, the kernel puts the task into
|
||||||
a permanant idling state since the background task must always be available
|
a permanent idling state since the background task must always be available
|
||||||
to execute.
|
to execute.
|
||||||
|
|
||||||
|
|
||||||
Task Scheduling
|
Task Scheduling
|
||||||
===============
|
===============
|
||||||
|
|
||||||
The nanokernel's scheduler executes the background task only when there is no
|
The nanokernel's scheduler executes the background task only when no fiber or
|
||||||
fiber or ISR that needs to execute, since fiber and ISR execution takes
|
ISR needs to execute; fiber and ISR executions always take precedence.
|
||||||
precedence.
|
|
||||||
|
|
||||||
The kernel automatically takes care of saving the background task's CPU register
|
The kernel automatically saves the background task's CPU register values when
|
||||||
values when it performs a context switch to a fiber or an ISR. It restores
|
prompted for a context switch to a fiber or ISR. These values are restored
|
||||||
these values when the background task later resumes execution.
|
when the background task later resumes execution.
|
||||||
|
|
||||||
|
|
||||||
Usage
|
Usage
|
||||||
|
@ -62,8 +62,8 @@ The application must supply a function of the following form:
|
||||||
}
|
}
|
||||||
|
|
||||||
This function is used as the background task's entry point function. If a
|
This function is used as the background task's entry point function. If a
|
||||||
nanokernel application does not need to perform any task-level processing
|
nanokernel application does not need to perform any task-level processing,
|
||||||
:c:func:`main()` can simply do an immediate return.
|
:code:`main()` can simply do an immediate return.
|
||||||
|
|
||||||
The :option:`MAIN_STACK_SIZE` configuration option specifies the size,
|
The :option:`MAIN_STACK_SIZE` configuration option specifies the size,
|
||||||
in bytes, of the memory region used for the background task's stack
|
in bytes, of the memory region used for the background task's stack
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue