<div dir="ltr">Looks good to me. </div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Dec 2, 2020 at 1:26 AM Sebastian Huber <<a href="mailto:sebastian.huber@embedded-brains.de">sebastian.huber@embedded-brains.de</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">The documentation is a consolidation of the comments in Doxygen markup<br>
and the documentation sources in Sphinx markup. The documentation was<br>
transfered to interface specification items. The documentation source<br>
files were generated from the items by a script.<br>
<br>
Update #3993.<br>
---<br>
<br>
The generated documentation is available here:<br>
<br>
<a href="https://ftp.rtems.org/pub/rtems/people/sebh/c-user.pdf" rel="noreferrer" target="_blank">https://ftp.rtems.org/pub/rtems/people/sebh/c-user.pdf</a><br>
<br>
c-user/timer/directives.rst | 992 +++++++++++++++++++++-------------<br>
c-user/timer/introduction.rst | 57 +-<br>
2 files changed, 674 insertions(+), 375 deletions(-)<br>
<br>
diff --git a/c-user/timer/directives.rst b/c-user/timer/directives.rst<br>
index d9b9877..d65f263 100644<br>
--- a/c-user/timer/directives.rst<br>
+++ b/c-user/timer/directives.rst<br>
@@ -1,463 +1,729 @@<br>
.. SPDX-License-Identifier: CC-BY-SA-4.0<br>
<br>
+.. Copyright (C) 2020 embedded brains GmbH (<a href="http://www.embedded-brains.de" rel="noreferrer" target="_blank">http://www.embedded-brains.de</a>)<br>
.. Copyright (C) 1988, 2008 On-Line Applications Research Corporation (OAR)<br>
<br>
+.. This file is part of the RTEMS quality process and was automatically<br>
+.. generated. If you find something that needs to be fixed or<br>
+.. worded better please post a report or patch to an RTEMS mailing list<br>
+.. or raise a bug report:<br>
+..<br>
+.. <a href="https://docs.rtems.org/branches/master/user/support/bugs.html" rel="noreferrer" target="_blank">https://docs.rtems.org/branches/master/user/support/bugs.html</a><br>
+..<br>
+.. For information on updating and regenerating please refer to:<br>
+..<br>
+.. <a href="https://docs.rtems.org/branches/master/eng/req/howto.html" rel="noreferrer" target="_blank">https://docs.rtems.org/branches/master/eng/req/howto.html</a><br>
+<br>
+.. _TimerManagerDirectives:<br>
+<br>
Directives<br>
==========<br>
<br>
-This section details the timer manager's directives. A subsection is dedicated<br>
-to each of this manager's directives and describes the calling sequence,<br>
-related constants, usage, and status codes.<br>
+This section details the directives of the Timer Manager. A subsection is<br>
+dedicated to each of this manager's directives and lists the calling sequence,<br>
+parameters, description, return values, and notes of the directive.<br>
+<br>
+.. Generated from spec:/rtems/timer/if/create<br>
<br>
.. raw:: latex<br>
<br>
- \clearpage<br>
+ \clearpage<br>
+<br>
+.. index:: rtems_timer_create()<br>
.. index:: create a timer<br>
-.. index:: rtems_timer_create<br>
<br>
-.. _rtems_timer_create:<br>
+.. _InterfaceRtemsTimerCreate:<br>
<br>
-TIMER_CREATE - Create a timer<br>
------------------------------<br>
+rtems_timer_create()<br>
+--------------------<br>
+<br>
+Creates a timer.<br>
+<br>
+.. rubric:: CALLING SEQUENCE:<br>
+<br>
+.. code-block:: c<br>
+<br>
+ rtems_status_code rtems_timer_create( rtems_name name, rtems_id *id );<br>
+<br>
+.. rubric:: PARAMETERS:<br>
+<br>
+``name``<br>
+ This parameter is the name of the timer.<br>
+<br>
+``id``<br>
+ This parameter is the pointer to an object identifier variable. The<br>
+ identifier of the created timer object will be stored in this variable, in<br>
+ case of a successful operation.<br>
+<br>
+.. rubric:: DESCRIPTION:<br>
<br>
-CALLING SEQUENCE:<br>
- .. code-block:: c<br>
-<br>
- rtems_status_code rtems_timer_create(<br>
- rtems_name name,<br>
- rtems_id *id<br>
- );<br>
-<br>
-DIRECTIVE STATUS CODES:<br>
- .. list-table::<br>
- :class: rtems-table<br>
-<br>
- * - ``RTEMS_SUCCESSFUL``<br>
- - timer created successfully<br>
- * - ``RTEMS_INVALID_ADDRESS``<br>
- - ``id`` is NULL<br>
- * - ``RTEMS_INVALID_NAME``<br>
- - invalid timer name<br>
- * - ``RTEMS_TOO_MANY``<br>
- - too many timers created<br>
-<br>
-DESCRIPTION:<br>
- This directive creates a timer. The assigned timer id is returned in id.<br>
- This id is used to access the timer with other timer manager directives.<br>
- For control and maintenance of the timer, RTEMS allocates a TMCB from the<br>
- local TMCB free pool and initializes it.<br>
-<br>
-NOTES:<br>
- This directive will obtain the allocator mutex and may cause the calling<br>
- task to be preempted.<br>
-<br>
- In SMP configurations, the processor of the currently executing thread<br>
- determines the processor used for the created timer. During the life-time<br>
- of the timer this processor is used to manage the timer internally.<br>
+This directive creates a timer. The assigned object identifier is returned in<br>
+``id``. This identifier is used to access the timer with other timer related<br>
+directives.<br>
+<br>
+.. rubric:: RETURN VALUES:<br>
+<br>
+:c:macro:`RTEMS_SUCCESSFUL`<br>
+ The requested operation was successful.<br>
+<br>
+:c:macro:`RTEMS_INVALID_NAME`<br>
+ The timer name was invalid.<br>
+<br>
+:c:macro:`RTEMS_INVALID_ADDRESS`<br>
+ The ``id`` parameter was `NULL<br>
+ <<a href="https://en.cppreference.com/w/c/types/NULL" rel="noreferrer" target="_blank">https://en.cppreference.com/w/c/types/NULL</a>>`_.<br>
+<br>
+:c:macro:`RTEMS_TOO_MANY`<br>
+ There was no inactive object available to create a new timer. The number<br>
+ of timers available to the application is configured through the<br>
+ :ref:`CONFIGURE_MAXIMUM_TIMERS` configuration option.<br>
+<br>
+.. rubric:: NOTES:<br>
+<br>
+This directive may cause the calling task to be preempted due to an obtain and<br>
+release of the object allocator mutex.<br>
+<br>
+For control and maintenance of the timer, RTEMS allocates a :term:`TMCB` from<br>
+the local TMCB free pool and initializes it.<br>
+<br>
+In SMP configurations, the processor of the currently executing thread<br>
+determines the processor used for the created timer. During the life-time of<br>
+the timer this processor is used to manage the timer internally.<br>
+<br>
+.. Generated from spec:/rtems/timer/if/ident<br>
<br>
.. raw:: latex<br>
<br>
- \clearpage<br>
+ \clearpage<br>
<br>
+.. index:: rtems_timer_ident()<br>
.. index:: obtain the ID of a timer<br>
-.. index:: rtems_timer_ident<br>
<br>
-.. _rtems_timer_ident:<br>
+.. _InterfaceRtemsTimerIdent:<br>
<br>
-TIMER_IDENT - Get ID of a timer<br>
--------------------------------<br>
+rtems_timer_ident()<br>
+-------------------<br>
+<br>
+Identifies a timer by the object name.<br>
<br>
-CALLING SEQUENCE:<br>
- .. code-block:: c<br>
+.. rubric:: CALLING SEQUENCE:<br>
<br>
- rtems_status_code rtems_timer_ident(<br>
- rtems_name name,<br>
- rtems_id *id<br>
- );<br>
+.. code-block:: c<br>
<br>
-DIRECTIVE STATUS CODES:<br>
- .. list-table::<br>
- :class: rtems-table<br>
+ rtems_status_code rtems_timer_ident( rtems_name name, rtems_id *id );<br>
<br>
- * - ``RTEMS_SUCCESSFUL``<br>
- - timer identified successfully<br>
- * - ``RTEMS_INVALID_ADDRESS``<br>
- - ``id`` is NULL<br>
- * - ``RTEMS_INVALID_NAME``<br>
- - timer name not found<br>
+.. rubric:: PARAMETERS:<br>
<br>
-DESCRIPTION:<br>
- This directive obtains the timer id associated with the timer name to be<br>
- acquired. If the timer name is not unique, then the timer id will match<br>
- one of the timers with that name. However, this timer id is not guaranteed<br>
- to correspond to the desired timer. The timer id is used to access this<br>
- timer in other timer related directives.<br>
+``name``<br>
+ This parameter is the object name to look up.<br>
<br>
-NOTES:<br>
- This directive will not cause the running task to be preempted.<br>
+``id``<br>
+ This parameter is the pointer to an object identifier variable. The object<br>
+ identifier of an object with the specified name will be stored in this<br>
+ variable, in case of a successful operation.<br>
+<br>
+.. rubric:: DESCRIPTION:<br>
+<br>
+This directive obtains the timer identifier associated with the timer name<br>
+specified in ``name``.<br>
+<br>
+.. rubric:: RETURN VALUES:<br>
+<br>
+:c:macro:`RTEMS_SUCCESSFUL`<br>
+ The requested operation was successful.<br>
+<br>
+:c:macro:`RTEMS_INVALID_ADDRESS`<br>
+ The ``id`` parameter was `NULL<br>
+ <<a href="https://en.cppreference.com/w/c/types/NULL" rel="noreferrer" target="_blank">https://en.cppreference.com/w/c/types/NULL</a>>`_.<br>
+<br>
+:c:macro:`RTEMS_INVALID_NAME`<br>
+ The ``name`` parameter was 0.<br>
+<br>
+:c:macro:`RTEMS_INVALID_NAME`<br>
+ There was no object with the specified name on the local node.<br>
+<br>
+.. rubric:: NOTES:<br>
+<br>
+If the timer name is not unique, then the timer identifier will match the first<br>
+timer with that name in the search order. However, this timer identifier is<br>
+not guaranteed to correspond to the desired timer. The timer identifier is<br>
+used with other timer related directives to access the timer.<br>
+<br>
+The objects are searched from lowest to the highest index. Only the local node<br>
+is searched.<br>
+<br>
+.. Generated from spec:/rtems/timer/if/cancel<br>
<br>
.. raw:: latex<br>
<br>
- \clearpage<br>
+ \clearpage<br>
<br>
+.. index:: rtems_timer_cancel()<br>
.. index:: cancel a timer<br>
-.. index:: rtems_timer_cancel<br>
<br>
-.. _rtems_timer_cancel:<br>
+.. _InterfaceRtemsTimerCancel:<br>
<br>
-TIMER_CANCEL - Cancel a timer<br>
------------------------------<br>
+rtems_timer_cancel()<br>
+--------------------<br>
<br>
-CALLING SEQUENCE:<br>
- .. code-block:: c<br>
+Cancels the timer.<br>
<br>
- rtems_status_code rtems_timer_cancel(<br>
- rtems_id id<br>
- );<br>
+.. rubric:: CALLING SEQUENCE:<br>
<br>
-DIRECTIVE STATUS CODES:<br>
- .. list-table::<br>
- :class: rtems-table<br>
+.. code-block:: c<br>
<br>
- * - ``RTEMS_SUCCESSFUL``<br>
- - timer canceled successfully<br>
- * - ``RTEMS_INVALID_ID``<br>
- - invalid timer id<br>
+ rtems_status_code rtems_timer_cancel( rtems_id id );<br>
<br>
-DESCRIPTION:<br>
- This directive cancels the timer id. This timer will be reinitiated by the<br>
- next invocation of ``rtems_timer_reset``, ``rtems_timer_fire_after``, or<br>
- ``rtems_timer_fire_when`` with this id.<br>
+.. rubric:: PARAMETERS:<br>
<br>
-NOTES:<br>
- This directive will not cause the running task to be preempted.<br>
+``id``<br>
+ This parameter is the timer identifier.<br>
+<br>
+.. rubric:: DESCRIPTION:<br>
+<br>
+This directive cancels the timer specified in the ``id`` parameter. This timer<br>
+will be reinitiated by the next invocation of :ref:`InterfaceRtemsTimerReset`,<br>
+:ref:`InterfaceRtemsTimerFireAfter`, or :ref:`InterfaceRtemsTimerFireWhen` with<br>
+the same timer identifier.<br>
+<br>
+.. rubric:: RETURN VALUES:<br>
+<br>
+:c:macro:`RTEMS_SUCCESSFUL`<br>
+ The requested operation was successful.<br>
+<br>
+:c:macro:`RTEMS_INVALID_ID`<br>
+ There was no timer associated with the identifier specified by ``id``.<br>
+<br>
+.. rubric:: NOTES:<br>
+<br>
+This directive will not cause the running task to be preempted.<br>
+<br>
+.. Generated from spec:/rtems/timer/if/delete<br>
<br>
.. raw:: latex<br>
<br>
- \clearpage<br>
+ \clearpage<br>
<br>
+.. index:: rtems_timer_delete()<br>
.. index:: delete a timer<br>
-.. index:: rtems_timer_delete<br>
<br>
-.. _rtems_timer_delete:<br>
+.. _InterfaceRtemsTimerDelete:<br>
<br>
-TIMER_DELETE - Delete a timer<br>
------------------------------<br>
+rtems_timer_delete()<br>
+--------------------<br>
+<br>
+Deletes the timer.<br>
+<br>
+.. rubric:: CALLING SEQUENCE:<br>
+<br>
+.. code-block:: c<br>
<br>
-CALLING SEQUENCE:<br>
- .. code-block:: c<br>
+ rtems_status_code rtems_timer_delete( rtems_id id );<br>
<br>
- rtems_status_code rtems_timer_delete(<br>
- rtems_id id<br>
- );<br>
+.. rubric:: PARAMETERS:<br>
<br>
-DIRECTIVE STATUS CODES:<br>
- .. list-table::<br>
- :class: rtems-table<br>
+``id``<br>
+ This parameter is the timer identifier.<br>
<br>
- * - ``RTEMS_SUCCESSFUL``<br>
- - timer deleted successfully<br>
- * - ``RTEMS_INVALID_ID``<br>
- - invalid timer id<br>
+.. rubric:: DESCRIPTION:<br>
<br>
-DESCRIPTION:<br>
- This directive deletes the timer specified by id. If the timer is running,<br>
- it is automatically canceled. The TMCB for the deleted timer is reclaimed<br>
- by RTEMS.<br>
+This directive deletes the timer specified by the ``id`` parameter. If the<br>
+timer is running, it is automatically canceled.<br>
<br>
-NOTES:<br>
- This directive will obtain the allocator mutex and may cause the calling<br>
- task to be preempted.<br>
+.. rubric:: RETURN VALUES:<br>
<br>
- A timer can be deleted by a task other than the task which created the<br>
- timer.<br>
+:c:macro:`RTEMS_SUCCESSFUL`<br>
+ The requested operation was successful.<br>
+<br>
+:c:macro:`RTEMS_INVALID_ID`<br>
+ There was no timer associated with the identifier specified by ``id``.<br>
+<br>
+.. rubric:: NOTES:<br>
+<br>
+This directive may cause the calling task to be preempted due to an obtain and<br>
+release of the object allocator mutex.<br>
+<br>
+The :term:`TMCB` for the deleted timer is reclaimed by RTEMS.<br>
+<br>
+A timer can be deleted by a task other than the task which created the timer.<br>
+<br>
+.. Generated from spec:/rtems/timer/if/fire-after<br>
<br>
.. raw:: latex<br>
<br>
- \clearpage<br>
+ \clearpage<br>
<br>
+.. index:: rtems_timer_fire_after()<br>
.. index:: fire a timer after an interval<br>
-.. index:: rtems_timer_fire_after<br>
-<br>
-.. _rtems_timer_fire_after:<br>
-<br>
-TIMER_FIRE_AFTER - Fire timer after interval<br>
---------------------------------------------<br>
-<br>
-CALLING SEQUENCE:<br>
- .. code-block:: c<br>
-<br>
- rtems_status_code rtems_timer_fire_after(<br>
- rtems_id id,<br>
- rtems_interval ticks,<br>
- rtems_timer_service_routine_entry routine,<br>
- void *user_data<br>
- );<br>
-<br>
-DIRECTIVE STATUS CODES:<br>
- .. list-table::<br>
- :class: rtems-table<br>
-<br>
- * - ``RTEMS_SUCCESSFUL``<br>
- - timer initiated successfully<br>
- * - ``RTEMS_INVALID_ADDRESS``<br>
- - ``routine`` is NULL<br>
- * - ``RTEMS_INVALID_ID``<br>
- - invalid timer id<br>
- * - ``RTEMS_INVALID_NUMBER``<br>
- - invalid interval<br>
-<br>
-DESCRIPTION:<br>
- This directive initiates the timer specified by id. If the timer is<br>
- running, it is automatically canceled before being initiated. The timer is<br>
- scheduled to fire after an interval ticks clock ticks has passed. When the<br>
- timer fires, the timer service routine routine will be invoked with the<br>
- argument user_data.<br>
-<br>
-NOTES:<br>
- This directive will not cause the running task to be preempted.<br>
+<br>
+.. _InterfaceRtemsTimerFireAfter:<br>
+<br>
+rtems_timer_fire_after()<br>
+------------------------<br>
+<br>
+Fires the timer after the interval.<br>
+<br>
+.. rubric:: CALLING SEQUENCE:<br>
+<br>
+.. code-block:: c<br>
+<br>
+ rtems_status_code rtems_timer_fire_after(<br>
+ rtems_id id,<br>
+ rtems_interval ticks,<br>
+ rtems_timer_service_routine_entry routine,<br>
+ void *user_data<br>
+ );<br>
+<br>
+.. rubric:: PARAMETERS:<br>
+<br>
+``id``<br>
+ This parameter is the timer identifier.<br>
+<br>
+``ticks``<br>
+ This parameter is the interval until the routine is fired in clock ticks.<br>
+<br>
+``routine``<br>
+ This parameter is the routine to schedule.<br>
+<br>
+``user_data``<br>
+ This parameter is the argument passed to the routine when it is fired.<br>
+<br>
+.. rubric:: DESCRIPTION:<br>
+<br>
+This directive initiates the timer specified by ``id``. If the timer is<br>
+running, it is automatically canceled before being initiated. The timer is<br>
+scheduled to fire after an interval of clock ticks has passed specified by<br>
+``ticks``. When the timer fires, the timer service routine ``routine`` will be<br>
+invoked with the argument ``user_data`` in the context of the clock tick<br>
+:term:`ISR`.<br>
+<br>
+.. rubric:: RETURN VALUES:<br>
+<br>
+:c:macro:`RTEMS_SUCCESSFUL`<br>
+ The requested operation was successful.<br>
+<br>
+:c:macro:`RTEMS_INVALID_NUMBER`<br>
+ The ``ticks`` parameter was 0.<br>
+<br>
+:c:macro:`RTEMS_INVALID_ADDRESS`<br>
+ The ``routine`` parameter was `NULL<br>
+ <<a href="https://en.cppreference.com/w/c/types/NULL" rel="noreferrer" target="_blank">https://en.cppreference.com/w/c/types/NULL</a>>`_.<br>
+<br>
+:c:macro:`RTEMS_INVALID_ID`<br>
+ There was no timer associated with the identifier specified by ``id``.<br>
+<br>
+.. rubric:: NOTES:<br>
+<br>
+This directive will not cause the running task to be preempted.<br>
+<br>
+.. Generated from spec:/rtems/timer/if/fire-when<br>
<br>
.. raw:: latex<br>
<br>
- \clearpage<br>
-<br>
-.. index:: fire a timer at wall time<br>
-.. index:: rtems_timer_fire_when<br>
-<br>
-.. _rtems_timer_fire_when:<br>
-<br>
-TIMER_FIRE_WHEN - Fire timer when specified<br>
--------------------------------------------<br>
-<br>
-CALLING SEQUENCE:<br>
- .. code-block:: c<br>
-<br>
- rtems_status_code rtems_timer_fire_when(<br>
- rtems_id id,<br>
- rtems_time_of_day *wall_time,<br>
- rtems_timer_service_routine_entry routine,<br>
- void *user_data<br>
- );<br>
-<br>
-DIRECTIVE STATUS CODES:<br>
- .. list-table::<br>
- :class: rtems-table<br>
-<br>
- * - ``RTEMS_SUCCESSFUL``<br>
- - timer initiated successfully<br>
- * - ``RTEMS_INVALID_ADDRESS``<br>
- - ``routine`` is NULL<br>
- * - ``RTEMS_INVALID_ADDRESS``<br>
- - ``wall_time`` is NULL<br>
- * - ``RTEMS_INVALID_ID``<br>
- - invalid timer id<br>
- * - ``RTEMS_NOT_DEFINED``<br>
- - system date and time is not set<br>
- * - ``RTEMS_INVALID_CLOCK``<br>
- - invalid time of day<br>
-<br>
-DESCRIPTION:<br>
- This directive initiates the timer specified by id. If the timer is<br>
- running, it is automatically canceled before being initiated. The timer is<br>
- scheduled to fire at the time of day specified by wall_time. When the<br>
- timer fires, the timer service routine routine will be invoked with the<br>
- argument user_data.<br>
-<br>
-NOTES:<br>
- This directive will not cause the running task to be preempted.<br>
+ \clearpage<br>
+<br>
+.. index:: rtems_timer_fire_when()<br>
+.. index:: fire a timer at time of day<br>
+<br>
+.. _InterfaceRtemsTimerFireWhen:<br>
+<br>
+rtems_timer_fire_when()<br>
+-----------------------<br>
+<br>
+Fires the timer at the time of day.<br>
+<br>
+.. rubric:: CALLING SEQUENCE:<br>
+<br>
+.. code-block:: c<br>
+<br>
+ rtems_status_code rtems_timer_fire_when(<br>
+ rtems_id id,<br>
+ rtems_time_of_day *wall_time,<br>
+ rtems_timer_service_routine_entry routine,<br>
+ void *user_data<br>
+ );<br>
+<br>
+.. rubric:: PARAMETERS:<br>
+<br>
+``id``<br>
+ This parameter is the timer identifier.<br>
+<br>
+``wall_time``<br>
+ This parameter is the time of day when the routine is fired.<br>
+<br>
+``routine``<br>
+ This parameter is the routine to schedule.<br>
+<br>
+``user_data``<br>
+ This parameter is the argument passed to the routine when it is fired.<br>
+<br>
+.. rubric:: DESCRIPTION:<br>
+<br>
+This directive initiates the timer specified by ``id``. If the timer is<br>
+running, it is automatically canceled before being initiated. The timer is<br>
+scheduled to fire at the time of day specified by ``wall_time``. When the<br>
+timer fires, the timer service routine ``routine`` will be invoked with the<br>
+argument ``user_data`` in the context of the clock tick :term:`ISR`.<br>
+<br>
+.. rubric:: RETURN VALUES:<br>
+<br>
+:c:macro:`RTEMS_SUCCESSFUL`<br>
+ The requested operation was successful.<br>
+<br>
+:c:macro:`RTEMS_NOT_DEFINED`<br>
+ The system date and time was not set.<br>
+<br>
+:c:macro:`RTEMS_INVALID_ADDRESS`<br>
+ The ``routine`` parameter was `NULL<br>
+ <<a href="https://en.cppreference.com/w/c/types/NULL" rel="noreferrer" target="_blank">https://en.cppreference.com/w/c/types/NULL</a>>`_.<br>
+<br>
+:c:macro:`RTEMS_INVALID_ADDRESS`<br>
+ The ``wall_time`` parameter was `NULL<br>
+ <<a href="https://en.cppreference.com/w/c/types/NULL" rel="noreferrer" target="_blank">https://en.cppreference.com/w/c/types/NULL</a>>`_.<br>
+<br>
+:c:macro:`RTEMS_INVALID_CLOCK`<br>
+ The time of day was invalid.<br>
+<br>
+:c:macro:`RTEMS_INVALID_ID`<br>
+ There was no timer associated with the identifier specified by ``id``.<br>
+<br>
+.. rubric:: NOTES:<br>
+<br>
+This directive will not cause the running task to be preempted.<br>
+<br>
+.. Generated from spec:/rtems/timer/if/initiate-server<br>
<br>
.. raw:: latex<br>
<br>
- \clearpage<br>
+ \clearpage<br>
<br>
+.. index:: rtems_timer_initiate_server()<br>
.. index:: initiate the Timer Server<br>
-.. index:: rtems_timer_initiate_server<br>
<br>
-.. _rtems_timer_initiate_server:<br>
+.. _InterfaceRtemsTimerInitiateServer:<br>
+<br>
+rtems_timer_initiate_server()<br>
+-----------------------------<br>
+<br>
+Initiates the Timer Server.<br>
+<br>
+.. rubric:: CALLING SEQUENCE:<br>
+<br>
+.. code-block:: c<br>
+<br>
+ rtems_status_code rtems_timer_initiate_server(<br>
+ rtems_task_priority priority,<br>
+ size_t stack_size,<br>
+ rtems_attribute attribute_set<br>
+ );<br>
+<br>
+.. rubric:: PARAMETERS:<br>
+<br>
+``priority``<br>
+ This parameter is the task priority.<br>
+<br>
+``stack_size``<br>
+ This parameter is the task stack size in bytes.<br>
<br>
-TIMER_INITIATE_SERVER - Initiate server for task-based timers<br>
--------------------------------------------------------------<br>
+``attribute_set``<br>
+ This parameter is the task attribute set.<br>
<br>
-CALLING SEQUENCE:<br>
- .. code-block:: c<br>
+.. rubric:: DESCRIPTION:<br>
<br>
- rtems_status_code rtems_timer_initiate_server(<br>
- uint32_t priority,<br>
- uint32_t stack_size,<br>
- rtems_attribute attribute_set<br>
- );<br>
+This directive initiates the Timer Server task. This task is responsible for<br>
+executing all timers initiated via the<br>
+:ref:`InterfaceRtemsTimerServerFireAfter` or<br>
+:ref:`InterfaceRtemsTimerServerFireWhen` directives.<br>
<br>
-DIRECTIVE STATUS CODES:<br>
- .. list-table::<br>
- :class: rtems-table<br>
+.. rubric:: RETURN VALUES:<br>
<br>
- * - ``RTEMS_SUCCESSFUL``<br>
- - Timer Server initiated successfully<br>
- * - ``RTEMS_TOO_MANY``<br>
- - too many tasks created<br>
+:c:macro:`RTEMS_SUCCESSFUL`<br>
+ The requested operation was successful.<br>
<br>
-DESCRIPTION:<br>
- This directive initiates the Timer Server task. This task is responsible<br>
- for executing all timers initiated via the<br>
- ``rtems_timer_server_fire_after`` or ``rtems_timer_server_fire_when``<br>
- directives.<br>
+:c:macro:`RTEMS_INCORRECT_STATE`<br>
+ The Timer Server was already initiated.<br>
<br>
-NOTES:<br>
- This directive could cause the calling task to be preempted.<br>
+:c:macro:`RTEMS_INVALID_PRIORITY`<br>
+ The task priority was invalid.<br>
<br>
- The Timer Server task is created using the ``rtems_task_create`` service<br>
- and must be accounted for when configuring the system.<br>
+:c:macro:`RTEMS_TOO_MANY`<br>
+ There was no inactive task object available to create the Timer Server<br>
+ task.<br>
<br>
- Even through this directive invokes the ``rtems_task_create`` and<br>
- ``rtems_task_start`` directives, it should only fail due to resource<br>
- allocation problems.<br>
+:c:macro:`RTEMS_UNSATISFIED`<br>
+ There was not enough memory to allocate the task storage area. The task<br>
+ storage area contains the task stack, the thread-local storage, and the<br>
+ floating point context.<br>
+<br>
+:c:macro:`RTEMS_UNSATISFIED`<br>
+ One of the task create extensions failed to create the Timer Server task.<br>
+<br>
+.. rubric:: NOTES:<br>
+<br>
+This directive may cause the calling task to be preempted due to an obtain and<br>
+release of the object allocator mutex.<br>
+<br>
+The Timer Server task is created using the :ref:`InterfaceRtemsTaskCreate`<br>
+directive and must be accounted for when configuring the system.<br>
+<br>
+.. Generated from spec:/rtems/timer/if/server-fire-after<br>
<br>
.. raw:: latex<br>
<br>
- \clearpage<br>
+ \clearpage<br>
<br>
+.. index:: rtems_timer_server_fire_after()<br>
.. index:: fire task-based a timer after an interval<br>
-.. index:: rtems_timer_server_fire_after<br>
-<br>
-.. _rtems_timer_server_fire_after:<br>
-<br>
-TIMER_SERVER_FIRE_AFTER - Fire task-based timer after interval<br>
---------------------------------------------------------------<br>
-<br>
-CALLING SEQUENCE:<br>
- .. code-block:: c<br>
-<br>
- rtems_status_code rtems_timer_server_fire_after(<br>
- rtems_id id,<br>
- rtems_interval ticks,<br>
- rtems_timer_service_routine_entry routine,<br>
- void *user_data<br>
- );<br>
-<br>
-DIRECTIVE STATUS CODES:<br>
- .. list-table::<br>
- :class: rtems-table<br>
-<br>
- * - ``RTEMS_SUCCESSFUL``<br>
- - timer initiated successfully<br>
- * - ``RTEMS_INVALID_ADDRESS``<br>
- - ``routine`` is NULL<br>
- * - ``RTEMS_INVALID_ID``<br>
- - invalid timer id<br>
- * - ``RTEMS_INVALID_NUMBER``<br>
- - invalid interval<br>
- * - ``RTEMS_INCORRECT_STATE``<br>
- - Timer Server not initiated<br>
-<br>
-DESCRIPTION:<br>
- This directive initiates the timer specified by id and specifies that when<br>
- it fires it will be executed by the Timer Server.<br>
-<br>
- If the timer is running, it is automatically canceled before being<br>
- initiated. The timer is scheduled to fire after an interval ticks clock<br>
- ticks has passed. When the timer fires, the timer service routine routine<br>
- will be invoked with the argument user_data.<br>
-<br>
-NOTES:<br>
- This directive will not cause the running task to be preempted.<br>
+<br>
+.. _InterfaceRtemsTimerServerFireAfter:<br>
+<br>
+rtems_timer_server_fire_after()<br>
+-------------------------------<br>
+<br>
+Fires the timer after the interval using the Timer Server.<br>
+<br>
+.. rubric:: CALLING SEQUENCE:<br>
+<br>
+.. code-block:: c<br>
+<br>
+ rtems_status_code rtems_timer_server_fire_after(<br>
+ rtems_id id,<br>
+ rtems_interval ticks,<br>
+ rtems_timer_service_routine_entry routine,<br>
+ void *user_data<br>
+ );<br>
+<br>
+.. rubric:: PARAMETERS:<br>
+<br>
+``id``<br>
+ This parameter is the timer identifier.<br>
+<br>
+``ticks``<br>
+ This parameter is the interval until the routine is fired in clock ticks.<br>
+<br>
+``routine``<br>
+ This parameter is the routine to schedule.<br>
+<br>
+``user_data``<br>
+ This parameter is the argument passed to the routine when it is fired.<br>
+<br>
+.. rubric:: DESCRIPTION:<br>
+<br>
+This directive initiates the timer specified by ``id``. If the timer is<br>
+running, it is automatically canceled before being initiated. The timer is<br>
+scheduled to fire after an interval of clock ticks has passed specified by<br>
+``ticks``. When the timer fires, the timer service routine ``routine`` will be<br>
+invoked with the argument ``user_data`` in the context of the Timer Server<br>
+task.<br>
+<br>
+.. rubric:: RETURN VALUES:<br>
+<br>
+:c:macro:`RTEMS_SUCCESSFUL`<br>
+ The requested operation was successful.<br>
+<br>
+:c:macro:`RTEMS_INCORRECT_STATE`<br>
+ The Timer Server was not initiated.<br>
+<br>
+:c:macro:`RTEMS_INVALID_NUMBER`<br>
+ The ``ticks`` parameter was 0.<br>
+<br>
+:c:macro:`RTEMS_INVALID_ADDRESS`<br>
+ The ``routine`` parameter was `NULL<br>
+ <<a href="https://en.cppreference.com/w/c/types/NULL" rel="noreferrer" target="_blank">https://en.cppreference.com/w/c/types/NULL</a>>`_.<br>
+<br>
+:c:macro:`RTEMS_INVALID_ID`<br>
+ There was no timer associated with the identifier specified by ``id``.<br>
+<br>
+.. rubric:: NOTES:<br>
+<br>
+This directive will not cause the running task to be preempted.<br>
+<br>
+.. Generated from spec:/rtems/timer/if/server-fire-when<br>
<br>
.. raw:: latex<br>
<br>
- \clearpage<br>
-<br>
-.. index:: fire a task-based timer at wall time<br>
-.. index:: rtems_timer_server_fire_when<br>
-<br>
-.. _rtems_timer_server_fire_when:<br>
-<br>
-TIMER_SERVER_FIRE_WHEN - Fire task-based timer when specified<br>
--------------------------------------------------------------<br>
-<br>
-CALLING SEQUENCE:<br>
- .. code-block:: c<br>
-<br>
- rtems_status_code rtems_timer_server_fire_when(<br>
- rtems_id id,<br>
- rtems_time_of_day *wall_time,<br>
- rtems_timer_service_routine_entry routine,<br>
- void *user_data<br>
- );<br>
-<br>
-DIRECTIVE STATUS CODES:<br>
- .. list-table::<br>
- :class: rtems-table<br>
-<br>
- * - ``RTEMS_SUCCESSFUL``<br>
- - timer initiated successfully<br>
- * - ``RTEMS_INVALID_ADDRESS``<br>
- - ``routine`` is NULL<br>
- * - ``RTEMS_INVALID_ADDRESS``<br>
- - ``wall_time`` is NULL<br>
- * - ``RTEMS_INVALID_ID``<br>
- - invalid timer id<br>
- * - ``RTEMS_NOT_DEFINED``<br>
- - system date and time is not set<br>
- * - ``RTEMS_INVALID_CLOCK``<br>
- - invalid time of day<br>
- * - ``RTEMS_INCORRECT_STATE``<br>
- - Timer Server not initiated<br>
-<br>
-DESCRIPTION:<br>
- This directive initiates the timer specified by id and specifies that when<br>
- it fires it will be executed by the Timer Server.<br>
-<br>
- If the timer is running, it is automatically canceled before being<br>
- initiated. The timer is scheduled to fire at the time of day specified by<br>
- wall_time. When the timer fires, the timer service routine routine will be<br>
- invoked with the argument user_data.<br>
-<br>
-NOTES:<br>
- This directive will not cause the running task to be preempted.<br>
+ \clearpage<br>
+<br>
+.. index:: rtems_timer_server_fire_when()<br>
+.. index:: fire a task-based timer at time of day<br>
+<br>
+.. _InterfaceRtemsTimerServerFireWhen:<br>
+<br>
+rtems_timer_server_fire_when()<br>
+------------------------------<br>
+<br>
+Fires the timer at the time of day using the Timer Server.<br>
+<br>
+.. rubric:: CALLING SEQUENCE:<br>
+<br>
+.. code-block:: c<br>
+<br>
+ rtems_status_code rtems_timer_server_fire_when(<br>
+ rtems_id id,<br>
+ rtems_time_of_day *wall_time,<br>
+ rtems_timer_service_routine_entry routine,<br>
+ void *user_data<br>
+ );<br>
+<br>
+.. rubric:: PARAMETERS:<br>
+<br>
+``id``<br>
+ This parameter is the timer identifier.<br>
+<br>
+``wall_time``<br>
+ This parameter is the time of day when the routine is fired.<br>
+<br>
+``routine``<br>
+ This parameter is the routine to schedule.<br>
+<br>
+``user_data``<br>
+ This parameter is the argument passed to the routine when it is fired.<br>
+<br>
+.. rubric:: DESCRIPTION:<br>
+<br>
+This directive initiates the timer specified by ``id``. If the timer is<br>
+running, it is automatically canceled before being initiated. The timer is<br>
+scheduled to fire at the time of day specified by ``wall_time``. When the<br>
+timer fires, the timer service routine ``routine`` will be invoked with the<br>
+argument ``user_data`` in the context of the Timer Server task.<br>
+<br>
+.. rubric:: RETURN VALUES:<br>
+<br>
+:c:macro:`RTEMS_SUCCESSFUL`<br>
+ The requested operation was successful.<br>
+<br>
+:c:macro:`RTEMS_INCORRECT_STATE`<br>
+ The Timer Server was not initiated.<br>
+<br>
+:c:macro:`RTEMS_NOT_DEFINED`<br>
+ The system date and time was not set.<br>
+<br>
+:c:macro:`RTEMS_INVALID_ADDRESS`<br>
+ The ``routine`` parameter was `NULL<br>
+ <<a href="https://en.cppreference.com/w/c/types/NULL" rel="noreferrer" target="_blank">https://en.cppreference.com/w/c/types/NULL</a>>`_.<br>
+<br>
+:c:macro:`RTEMS_INVALID_ADDRESS`<br>
+ The ``wall_time`` parameter was `NULL<br>
+ <<a href="https://en.cppreference.com/w/c/types/NULL" rel="noreferrer" target="_blank">https://en.cppreference.com/w/c/types/NULL</a>>`_.<br>
+<br>
+:c:macro:`RTEMS_INVALID_CLOCK`<br>
+ The time of day was invalid.<br>
+<br>
+:c:macro:`RTEMS_INVALID_ID`<br>
+ There was no timer associated with the identifier specified by ``id``.<br>
+<br>
+.. rubric:: NOTES:<br>
+<br>
+This directive will not cause the running task to be preempted.<br>
+<br>
+.. Generated from spec:/rtems/timer/if/reset<br>
<br>
.. raw:: latex<br>
<br>
- \clearpage<br>
+ \clearpage<br>
<br>
+.. index:: rtems_timer_reset()<br>
.. index:: reset a timer<br>
-.. index:: rtems_timer_reset<br>
<br>
-.. _rtems_timer_reset:<br>
+.. _InterfaceRtemsTimerReset:<br>
+<br>
+rtems_timer_reset()<br>
+-------------------<br>
+<br>
+Resets the timer.<br>
+<br>
+.. rubric:: CALLING SEQUENCE:<br>
+<br>
+.. code-block:: c<br>
+<br>
+ rtems_status_code rtems_timer_reset( rtems_id id );<br>
+<br>
+.. rubric:: PARAMETERS:<br>
+<br>
+``id``<br>
+ This parameter is the timer identifier.<br>
+<br>
+.. rubric:: DESCRIPTION:<br>
+<br>
+This directive resets the timer specified by ``id``. This timer must have been<br>
+previously initiated with either the :ref:`InterfaceRtemsTimerFireAfter` or<br>
+:ref:`InterfaceRtemsTimerServerFireAfter` directive. If active the timer is<br>
+canceled, after which the timer is reinitiated using the same interval and<br>
+timer service routine which the original :ref:`InterfaceRtemsTimerFireAfter` or<br>
+:ref:`InterfaceRtemsTimerServerFireAfter` directive used.<br>
+<br>
+.. rubric:: RETURN VALUES:<br>
+<br>
+:c:macro:`RTEMS_SUCCESSFUL`<br>
+ The requested operation was successful.<br>
+<br>
+:c:macro:`RTEMS_INVALID_ID`<br>
+ There was no timer associated with the identifier specified by ``id``.<br>
+<br>
+:c:macro:`RTEMS_NOT_DEFINED`<br>
+ The timer was not of the interval class.<br>
+<br>
+.. rubric:: NOTES:<br>
+<br>
+This directive will not cause the running task to be preempted.<br>
+<br>
+If the timer has not been used or the last usage of this timer was by a<br>
+:ref:`InterfaceRtemsTimerFireWhen` or :ref:`InterfaceRtemsTimerServerFireWhen`<br>
+directive, then the :c:macro:`RTEMS_NOT_DEFINED` error is returned.<br>
+<br>
+Restarting a cancelled after timer results in the timer being reinitiated with<br>
+its previous timer service routine and interval.<br>
+<br>
+.. Generated from spec:/rtems/timer/if/get-information<br>
+<br>
+.. raw:: latex<br>
+<br>
+ \clearpage<br>
+<br>
+.. index:: rtems_timer_get_information()<br>
+<br>
+.. _InterfaceRtemsTimerGetInformation:<br>
+<br>
+rtems_timer_get_information()<br>
+-----------------------------<br>
+<br>
+Gets information about the timer.<br>
+<br>
+.. rubric:: CALLING SEQUENCE:<br>
+<br>
+.. code-block:: c<br>
+<br>
+ rtems_status_code rtems_timer_get_information(<br>
+ rtems_id id,<br>
+ rtems_timer_information *the_info<br>
+ );<br>
+<br>
+.. rubric:: PARAMETERS:<br>
+<br>
+``id``<br>
+ This parameter is the timer identifier.<br>
<br>
-TIMER_RESET - Reset an interval timer<br>
--------------------------------------<br>
+``the_info``<br>
+ This parameter is the pointer to a timer information variable. The<br>
+ information about the timer will be stored in this variable, in case of a<br>
+ successful operation.<br>
<br>
-CALLING SEQUENCE:<br>
- .. code-block:: c<br>
+.. rubric:: DESCRIPTION:<br>
<br>
- rtems_status_code rtems_timer_reset(<br>
- rtems_id id<br>
- );<br>
+This directive returns information about the timer.<br>
<br>
-DIRECTIVE STATUS CODES:<br>
- .. list-table::<br>
- :class: rtems-table<br>
+.. rubric:: RETURN VALUES:<br>
<br>
- * - ``RTEMS_SUCCESSFUL``<br>
- - timer reset successfully<br>
- * - ``RTEMS_INVALID_ID``<br>
- - invalid timer id<br>
- * - ``RTEMS_NOT_DEFINED``<br>
- - attempted to reset a when or newly created timer<br>
+:c:macro:`RTEMS_SUCCESSFUL`<br>
+ The requested operation was successful.<br>
<br>
-DESCRIPTION:<br>
- This directive resets the timer associated with id. This timer must have<br>
- been previously initiated with either the ``rtems_timer_fire_after`` or<br>
- ``rtems_timer_server_fire_after`` directive. If active the timer is<br>
- canceled, after which the timer is reinitiated using the same interval and<br>
- timer service routine which the original ``rtems_timer_fire_after`` or<br>
- ``rtems_timer_server_fire_after`` directive used.<br>
+:c:macro:`RTEMS_INVALID_ADDRESS`<br>
+ The ``the_info`` parameter was `NULL<br>
+ <<a href="https://en.cppreference.com/w/c/types/NULL" rel="noreferrer" target="_blank">https://en.cppreference.com/w/c/types/NULL</a>>`_.<br>
<br>
-NOTES:<br>
- If the timer has not been used or the last usage of this timer was by a<br>
- ``rtems_timer_fire_when`` or ``rtems_timer_server_fire_when`` directive,<br>
- then the ``RTEMS_NOT_DEFINED`` error is returned.<br>
+:c:macro:`RTEMS_INVALID_ID`<br>
+ There was no timer associated with the identifier specified by ``id``.<br>
<br>
- Restarting a cancelled after timer results in the timer being reinitiated<br>
- with its previous timer service routine and interval.<br>
+.. rubric:: NOTES:<br>
<br>
- This directive will not cause the running task to be preempted.<br>
+This directive will not cause the running task to be preempted.<br>
diff --git a/c-user/timer/introduction.rst b/c-user/timer/introduction.rst<br>
index 48a36ba..78f6c67 100644<br>
--- a/c-user/timer/introduction.rst<br>
+++ b/c-user/timer/introduction.rst<br>
@@ -1,29 +1,62 @@<br>
.. SPDX-License-Identifier: CC-BY-SA-4.0<br>
<br>
+.. Copyright (C) 2020 embedded brains GmbH (<a href="http://www.embedded-brains.de" rel="noreferrer" target="_blank">http://www.embedded-brains.de</a>)<br>
.. Copyright (C) 1988, 2008 On-Line Applications Research Corporation (OAR)<br>
<br>
+.. This file is part of the RTEMS quality process and was automatically<br>
+.. generated. If you find something that needs to be fixed or<br>
+.. worded better please post a report or patch to an RTEMS mailing list<br>
+.. or raise a bug report:<br>
+..<br>
+.. <a href="https://docs.rtems.org/branches/master/user/support/bugs.html" rel="noreferrer" target="_blank">https://docs.rtems.org/branches/master/user/support/bugs.html</a><br>
+..<br>
+.. For information on updating and regenerating please refer to:<br>
+..<br>
+.. <a href="https://docs.rtems.org/branches/master/eng/req/howto.html" rel="noreferrer" target="_blank">https://docs.rtems.org/branches/master/eng/req/howto.html</a><br>
+<br>
+.. Generated from spec:/rtems/timer/if/group<br>
+<br>
+.. _TimerManagerIntroduction:<br>
+<br>
Introduction<br>
============<br>
<br>
-The timer manager provides support for timer<br>
-facilities. The directives provided by the timer manager are:<br>
+.. The following list was generated from:<br>
+.. spec:/rtems/timer/if/create<br>
+.. spec:/rtems/timer/if/ident<br>
+.. spec:/rtems/timer/if/cancel<br>
+.. spec:/rtems/timer/if/delete<br>
+.. spec:/rtems/timer/if/fire-after<br>
+.. spec:/rtems/timer/if/fire-when<br>
+.. spec:/rtems/timer/if/initiate-server<br>
+.. spec:/rtems/timer/if/server-fire-after<br>
+.. spec:/rtems/timer/if/server-fire-when<br>
+.. spec:/rtems/timer/if/reset<br>
+.. spec:/rtems/timer/if/get-information<br>
+<br>
+The Timer Manager provides support for timer facilities. The directives<br>
+provided by the Timer Manager are:<br>
+<br>
+* :ref:`InterfaceRtemsTimerCreate` - Creates a timer.<br>
<br>
-- :ref:`rtems_timer_create`<br>
+* :ref:`InterfaceRtemsTimerIdent` - Identifies a timer by the object name.<br>
<br>
-- :ref:`rtems_timer_ident`<br>
+* :ref:`InterfaceRtemsTimerCancel` - Cancels the timer.<br>
<br>
-- :ref:`rtems_timer_cancel`<br>
+* :ref:`InterfaceRtemsTimerDelete` - Deletes the timer.<br>
<br>
-- :ref:`rtems_timer_delete`<br>
+* :ref:`InterfaceRtemsTimerFireAfter` - Fires the timer after the interval.<br>
<br>
-- :ref:`rtems_timer_fire_after`<br>
+* :ref:`InterfaceRtemsTimerFireWhen` - Fires the timer at the time of day.<br>
<br>
-- :ref:`rtems_timer_fire_when`<br>
+* :ref:`InterfaceRtemsTimerInitiateServer` - Initiates the Timer Server.<br>
<br>
-- :ref:`rtems_timer_initiate_server`<br>
+* :ref:`InterfaceRtemsTimerServerFireAfter` - Fires the timer after the<br>
+ interval using the Timer Server.<br>
<br>
-- :ref:`rtems_timer_server_fire_after`<br>
+* :ref:`InterfaceRtemsTimerServerFireWhen` - Fires the timer at the time of day<br>
+ using the Timer Server.<br>
<br>
-- :ref:`rtems_timer_server_fire_when`<br>
+* :ref:`InterfaceRtemsTimerReset` - Resets the timer.<br>
<br>
-- :ref:`rtems_timer_reset`<br>
+* :ref:`InterfaceRtemsTimerGetInformation` - Gets information about the timer.<br>
-- <br>
2.26.2<br>
<br>
_______________________________________________<br>
devel mailing list<br>
<a href="mailto:devel@rtems.org" target="_blank">devel@rtems.org</a><br>
<a href="http://lists.rtems.org/mailman/listinfo/devel" rel="noreferrer" target="_blank">http://lists.rtems.org/mailman/listinfo/devel</a><br>
</blockquote></div>