[PATCH rtems-docs] c-user: Update references to rtems_task_wake_after
Kinsey Moore
kinsey.moore at oarcorp.com
Tue Jun 27 20:18:27 UTC 2023
rtems_task_wake_after takes a parameter in terms of ticks and not any
time base. This updates documentation to reflect that and refers any
applications needing a time base to nanosleep or clock_nanosleep.
Closes #4772
---
c-user/scheduling-concepts/background.rst | 6 +++---
c-user/task/directives.rst | 12 +++++++-----
c-user/task/operations.rst | 9 ++++++---
3 files changed, 16 insertions(+), 11 deletions(-)
diff --git a/c-user/scheduling-concepts/background.rst b/c-user/scheduling-concepts/background.rst
index 1fe7089..00eb8f0 100644
--- a/c-user/scheduling-concepts/background.rst
+++ b/c-user/scheduling-concepts/background.rst
@@ -160,7 +160,7 @@ Manual Round-Robin
The final mechanism for altering the RTEMS scheduling algorithm is called
manual round-robin. Manual round-robin is invoked by using
-the ``rtems_task_wake_after`` directive with a time interval of
+the ``rtems_task_wake_after`` directive with a ticks parameter of
``RTEMS_YIELD_PROCESSOR``. This allows a task to give up the processor and be
immediately returned to the ready chain at the end of its priority group. If
no other tasks of the same priority are ready to run, then the task does not
@@ -243,7 +243,7 @@ of the following conditions:
option and the requested semaphore is unavailable.
- The running task issues a ``rtems_task_wake_after`` directive which blocks
- the task for the given time interval. If the time interval specified is
+ the task for the given number of ticks. If the number of ticks specified is
zero, the task yields the processor and remains in the ready state.
- The running task issues a ``rtems_task_wake_when`` directive which blocks the
@@ -280,7 +280,7 @@ conditions:
- A running task issues a ``rtems_semaphore_release`` directive which releases
the semaphore on which the blocked task is waiting.
-- A timeout interval expires for a task which was blocked by a call to the
+- A tick interval expires for a task which was blocked by a call to the
``rtems_task_wake_after`` directive.
- A timeout period expires for a task which blocked by a call to the
diff --git a/c-user/task/directives.rst b/c-user/task/directives.rst
index c082b51..3334679 100644
--- a/c-user/task/directives.rst
+++ b/c-user/task/directives.rst
@@ -1475,15 +1475,15 @@ The following constraints apply to this directive:
\clearpage
.. index:: rtems_task_wake_after()
-.. index:: delay a task for an interval
-.. index:: wake up after an interval
+.. index:: delay a task for a number of ticks
+.. index:: wake up after a number of ticks
.. _InterfaceRtemsTaskWakeAfter:
rtems_task_wake_after()
-----------------------
-Wakes up after an interval in :term:`clock ticks <clock tick>` or yields the
+Wakes up after a number of :term:`clock ticks <clock tick>` or yields the
processor.
.. rubric:: CALLING SEQUENCE:
@@ -1502,10 +1502,12 @@ processor.
This directive blocks the calling task for the specified ``ticks`` of clock
ticks if the value is not equal to :c:macro:`RTEMS_YIELD_PROCESSOR`. When the
-requested interval has elapsed, the task is made ready. The clock tick
+requested number of ticks has elapsed, the task is made ready. The clock tick
directives automatically updates the delay period. The calling task may give
up the processor and remain in the ready state by specifying a value of
-:c:macro:`RTEMS_YIELD_PROCESSOR` in ``ticks``.
+:c:macro:`RTEMS_YIELD_PROCESSOR` in ``ticks``. Applications requiring use of a
+time base instead of system ticks should make use of ``nanosleep()`` or
+``clock_nanosleep()``.
.. rubric:: RETURN VALUES:
diff --git a/c-user/task/operations.rst b/c-user/task/operations.rst
index 6308d7b..9a55b6c 100644
--- a/c-user/task/operations.rst
+++ b/c-user/task/operations.rst
@@ -75,9 +75,9 @@ Delaying the Currently Executing Task
-------------------------------------
The ``rtems_task_wake_after`` directive creates a sleep timer which allows a
-task to go to sleep for a specified interval. The task is blocked until the
-delay interval has elapsed, at which time the task is unblocked. A task
-calling the ``rtems_task_wake_after`` directive with a delay interval of
+task to go to sleep for a specified number of ticks. The task is blocked until
+the number of ticks has elapsed, at which time the task is unblocked. A task
+calling the ``rtems_task_wake_after`` directive with a delay of
``RTEMS_YIELD_PROCESSOR`` ticks will yield the processor to any other ready
task of equal or greater priority and remain ready to execute.
@@ -86,6 +86,9 @@ task to go to sleep until a specified date and time. The calling task is
blocked until the specified date and time has occurred, at which time the task
is unblocked.
+Applications requiring intervals in a time base should use ``nanosleep()`` or
+``clock_nanosleep()``.
+
Changing Task Priority
----------------------
--
2.30.2
More information about the devel
mailing list