summaryrefslogtreecommitdiffstats
path: root/doc/user/timer.t
diff options
context:
space:
mode:
Diffstat (limited to 'doc/user/timer.t')
-rw-r--r--doc/user/timer.t58
1 files changed, 33 insertions, 25 deletions
diff --git a/doc/user/timer.t b/doc/user/timer.t
index 2f4538a12b..bdfb6d1801 100644
--- a/doc/user/timer.t
+++ b/doc/user/timer.t
@@ -65,10 +65,11 @@ A clock tick is required to support the functionality provided by this manager.
A timer is an RTEMS object which allows the
application to schedule operations to occur at specific times in
the future. User supplied timer service routines are invoked by
-the clock_tick directive when the timer fires. Timer service
-routines may perform any operations or directives which normally
+the @code{@value{DIRPREFIX}clock_tick} directive
+when the timer fires. Timer service routines may perform
+any operations or directives which normally
would be performed by the application code which invoked the
-clock_tick directive.
+@code{@value{DIRPREFIX}clock_tick} directive.
The timer can be used to implement watchdog routines
which only fire to denote that an application error has
@@ -131,7 +132,7 @@ service routine. The argument user_data may be NULL.
@end ifinfo
@subsection Creating a Timer
-The timer_create directive creates a timer by
+The @code{@value{DIRPREFIX}timer_create} directive creates a timer by
allocating a Timer Control Block (TMCB), assigning the timer a
user-specified name, and assigning it a timer ID. Newly created
timers do not have a timer service routine associated with them
@@ -145,55 +146,58 @@ and are not active.
When a timer is created, RTEMS generates a unique
timer ID and assigns it to the created timer until it is
deleted. The timer ID may be obtained by either of two methods.
-First, as the result of an invocation of the timer_create
+First, as the result of an invocation of the
+@code{@value{DIRPREFIX}timer_create}
directive, the timer ID is stored in a user provided location.
-Second, the timer ID may be obtained later using the timer_ident
-directive. The timer ID is used by other directives to
-manipulate this timer.
+Second, the timer ID may be obtained later using the
+@code{@value{DIRPREFIX}timer_ident} directive. The timer ID
+is used by other directives to manipulate this timer.
@ifinfo
@node Initiating an Interval Timer, Initiating a Time of Day Timer, Obtaining Timer IDs, Timer Manager Operations
@end ifinfo
@subsection Initiating an Interval Timer
-The timer_fire_after directive initiates a timer to
+The @code{@value{DIRPREFIX}timer_fire_after} directive initiates a timer to
fire a user provided timer service routine after the specified
number of clock ticks have elapsed. When the interval has
elapsed, the timer service routine will be invoked from the
-clock_tick directive.
+@code{@value{DIRPREFIX}clock_tick} directive.
@ifinfo
@node Initiating a Time of Day Timer, Canceling a Timer, Initiating an Interval Timer, Timer Manager Operations
@end ifinfo
@subsection Initiating a Time of Day Timer
-The timer_fire_when directive initiates a timer to
+The @code{@value{DIRPREFIX}timer_fire_when} directive initiates a timer to
fire a user provided timer service routine when the specified
time of day has been reached. When the interval has elapsed,
-the timer service routine will be invoked from the clock_tick
-directive.
+the timer service routine will be invoked from the
+@code{@value{DIRPREFIX}clock_tick} directive.
@ifinfo
@node Canceling a Timer, Resetting a Timer, Initiating a Time of Day Timer, Timer Manager Operations
@end ifinfo
@subsection Canceling a Timer
-The timer_cancel directive is used to halt the
+The @code{@value{DIRPREFIX}timer_cancel} directive is used to halt the
specified timer. Once canceled, the timer service routine will
not fire unless the timer is reinitiated. The timer can be
-reinitiated using the timer_reset, timer_fire_after, and
-timer_fire_when directives.
+reinitiated using the @code{@value{DIRPREFIX}timer_reset},
+@code{@value{DIRPREFIX}timer_fire_after}, and
+@code{@value{DIRPREFIX}timer_fire_when} directives.
@ifinfo
@node Resetting a Timer, Deleting a Timer, Canceling a Timer, Timer Manager Operations
@end ifinfo
@subsection Resetting a Timer
-The timer_reset directive is used to restore an
+The @code{@value{DIRPREFIX}timer_reset} directive is used to restore an
interval timer initiated by a previous invocation of
-timer_fire_after to its original interval length. If the
+@code{@value{DIRPREFIX}timer_fire_after} to
+its original interval length. If the
timer has not been used or the last usage of this timer
-was by a timer_fire_when directive, then an error is
+was by a @code{@value{DIRPREFIX}timer_fire_when} directive, then an error is
returned. The timer service routine is not changed or
fired by this directive.
@@ -202,7 +206,7 @@ fired by this directive.
@end ifinfo
@subsection Deleting a Timer
-The timer_delete directive is used to delete a timer.
+The @code{@value{DIRPREFIX}timer_delete} directive is used to delete a timer.
If the timer is running and has not expired, the timer is
automatically canceled. The timer's control block is returned
to the TMCB free list when it is deleted. A timer can be
@@ -352,8 +356,9 @@ procedure Timer_Cancel (
@subheading DESCRIPTION:
This directive cancels the timer id. This timer will
-be reinitiated by the next invocation of timer_reset,
-timer_fire_after, or timer_fire_when with id.
+be reinitiated by the next invocation of @code{@value{DIRPREFIX}timer_reset},
+@code{@value{DIRPREFIX}timer_fire_after}, or
+@code{@value{DIRPREFIX}timer_fire_when} with id.
@subheading NOTES:
@@ -537,15 +542,18 @@ procedure Timer_Reset (
This directive resets the timer associated with id.
This timer must have been previously initiated with a
-timer_fire_after directive. If active the timer is canceled,
+@code{@value{DIRPREFIX}timer_fire_after}
+directive. If active the timer is canceled,
after which the timer is reinitiated using the same interval and
-timer service routine which the original timer_fire_after
+timer service routine which the original
+@code{@value{DIRPREFIX}timer_fire_after}
directive used.
@subheading NOTES:
If the timer has not been used or the last usage of this timer
-was by a timer_fire_when directive, then the NOT_DEFINED error is
+was by a @code{@value{DIRPREFIX}timer_fire_when}
+directive, then the @code{@value{RPREFIX}NOT_DEFINED} error is
returned.
Restarting a cancelled after timer results in the timer being