19 #ifndef _RTEMS_SCORE_WATCHDOGIMPL_H 20 #define _RTEMS_SCORE_WATCHDOGIMPL_H 41 #define WATCHDOG_INITIALIZER( routine, id, user_data ) \ 46 ( routine ), ( id ), ( user_data ) \ 286 #if defined(RTEMS_DEBUG) 288 the_watchdog->
id = 0;
307 the_watchdog->
routine = routine;
308 the_watchdog->
id = id;
428 _Watchdog_Remove_ticks( the_watchdog );
This is used to manage each element (node) which is placed on a chain.
Definition: chain.h:65
Chain_Node * previous
This points to the node immediate prior to this one on this chain.
Definition: chain.h:69
RTEMS_INLINE_ROUTINE void _Watchdog_Activate(Watchdog_Control *the_watchdog)
This routine activates THE_WATCHDOG timer which is already on a watchdog chain.
Definition: watchdogimpl.h:331
RTEMS_INLINE_ROUTINE void _Watchdog_Reset_ticks(Watchdog_Control *the_watchdog)
This routine resets THE_WATCHDOG timer to its state at INSERT time.
Definition: watchdogimpl.h:423
RTEMS_INLINE_ROUTINE void _Watchdog_Tickle_ticks(void)
This routine is invoked at each clock tick to update the ticks watchdog chain.
Definition: watchdogimpl.h:345
#define _ISR_lock_ISR_disable_and_acquire(_lock, _context)
Acquires an ISR lock.
Definition: isrlock.h:205
void _Watchdog_Adjust_backward_locked(Watchdog_Header *header, Watchdog_Interval units)
Adjusts the watchdogs in backward direction in a locked context.
Definition: watchdogadjust.c:23
#define RTEMS_INLINE_ROUTINE
The following (in conjunction with compiler arguments) are used to choose between the use of static i...
Definition: basedefs.h:135
#define ISR_LOCK_MEMBER(_designator)
Defines an ISR lock member.
Definition: isrlock.h:89
RTEMS_INLINE_ROUTINE Watchdog_Control * _Watchdog_Next(Watchdog_Control *the_watchdog)
This routine returns a pointer to the watchdog timer following THE_WATCHDOG on the watchdog chain...
Definition: watchdogimpl.h:439
The control block used to manage each watchdog timer.
Definition: watchdog.h:98
Chain_Node Node
A node for a Watchdog_Header::Iterators chain.
Definition: watchdogimpl.h:57
RTEMS_INLINE_ROUTINE Watchdog_Control * _Watchdog_First(Watchdog_Header *header)
This routine returns a pointer to the first watchdog timer on the watchdog chain HEADER.
Definition: watchdogimpl.h:467
This is used to manage a chain.
Definition: chain.h:83
void _Watchdog_Tick(void)
Triggers a watchdog tick.
Definition: watchdogtick.c:25
#define _ISR_lock_Initialize(_lock, _name)
Initializes an ISR lock.
Definition: isrlock.h:167
void _Watchdog_Insert(Watchdog_Header *header, Watchdog_Control *the_watchdog)
Inserts the_watchdog into the header watchdog chain for a time of units.
Definition: watchdoginsert.c:115
Constants and Structures Associated with Watchdog Timers.
void _Watchdog_Handler_initialization(void)
Initialize the watchdog handler.
Definition: watchdog.c:26
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(Chain_Control *the_chain)
Initialize this chain as empty.
Definition: chainimpl.h:613
void _Watchdog_Tickle(Watchdog_Header *header)
This routine is invoked at appropriate intervals to update the header watchdog chain.
Definition: watchdogremove.c:116
Watchdog_Service_routine_entry routine
This field is the function to invoke.
Definition: watchdog.h:114
Watchdog_Interval initial
This field is the initially requested interval.
Definition: watchdog.h:106
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(const Chain_Control *the_chain)
Is the chain empty.
Definition: chainimpl.h:499
Watchdog_States
Set of the states which a watchdog timer may be at any given time.
Definition: watchdog.h:81
Chain_Node Node
This field is a Chain Node structure and allows this to be placed on chains for set management...
Definition: watchdog.h:102
Chain_Node * next
This points to the node after this one on this chain.
Definition: chain.h:67
Watchdog_States state
This field is the state of the watchdog.
Definition: watchdog.h:104
Chain_Node * current
The current watchdog of the chain on the way to insert the new watchdog.
Definition: watchdogimpl.h:68
RTEMS_INLINE_ROUTINE void _Watchdog_Insert_seconds(Watchdog_Control *the_watchdog, Watchdog_Interval units)
This routine inserts THE_WATCHDOG into the seconds watchdog chain for a time of UNITS seconds...
Definition: watchdogimpl.h:390
void _Watchdog_Adjust_forward_locked(Watchdog_Header *header, Watchdog_Interval units, ISR_lock_Context *lock_context)
Adjusts the watchdogs in forward direction in a locked context.
Definition: watchdogadjust.c:45
This is the state when the watchdog is off all chains.
Definition: watchdog.h:83
#define _ISR_lock_Flash(_lock, _context)
Flashes an ISR lock.
Definition: isrlock.h:309
void _Watchdog_Adjust_backward(Watchdog_Header *header, Watchdog_Interval units)
Adjusts the header watchdog chain in the backward direction for units ticks.
Definition: watchdogadjust.c:33
void _Watchdog_Insert_locked(Watchdog_Header *header, Watchdog_Control *the_watchdog, ISR_lock_Context *lock_context)
Inserts the watchdog in a locked context.
Definition: watchdoginsert.c:52
RTEMS_INLINE_ROUTINE Chain_Node * _Chain_Last(Chain_Control *the_chain)
Return pointer to chain's last node.
Definition: chainimpl.h:400
#define _ISR_lock_Release_and_ISR_enable(_lock, _context)
Releases an ISR lock.
Definition: isrlock.h:230
#define _Assert(_e)
Assertion similar to assert() controlled via RTEMS_DEBUG instead of NDEBUG.
Definition: assert.h:83
RTEMS_INLINE_ROUTINE Watchdog_Control * _Watchdog_Last(Watchdog_Header *header)
This routine returns a pointer to the last watchdog timer on the watchdog chain HEADER.
Definition: watchdogimpl.h:481
This is the state when the watchdog is on a chain, and allowed to fire.
Definition: watchdog.h:89
RTEMS_INLINE_ROUTINE void _Watchdog_Tickle_seconds(void)
This routine is invoked at each clock tick to update the seconds watchdog chain.
Definition: watchdogimpl.h:357
RTEMS_INLINE_ROUTINE void _Watchdog_Initialize(Watchdog_Control *the_watchdog, Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data)
This routine initializes the specified watchdog.
Definition: watchdogimpl.h:299
RTEMS_INLINE_ROUTINE Chain_Node * _Chain_First(Chain_Control *the_chain)
Return pointer to chain's first node.
Definition: chainimpl.h:366
uint32_t Watchdog_Interval
Type is used to specify the length of intervals.
Definition: watchdog.h:47
void _Watchdog_Adjust_forward(Watchdog_Header *header, Watchdog_Interval units)
Adjusts the header watchdog chain in the forward direction for units ticks.
Definition: watchdogadjust.c:70
RTEMS_INLINE_ROUTINE Watchdog_Control * _Watchdog_Previous(Watchdog_Control *the_watchdog)
This routine returns a pointer to the watchdog timer preceding THE_WATCHDOG on the watchdog chain...
Definition: watchdogimpl.h:453
Iterator item to synchronize concurrent insert, remove and tickle operations.
Definition: watchdogimpl.h:53
Watchdog_Service_routine(* Watchdog_Service_routine_entry)(Objects_Id, void *)
Pointer to a watchdog service routine.
Definition: watchdog.h:61
Local ISR lock context for acquire and release pairs.
Definition: isrlock.h:65
RTEMS_INLINE_ROUTINE void _Watchdog_Preinitialize(Watchdog_Control *the_watchdog)
Pre-initializes a watchdog.
Definition: watchdogimpl.h:281
Watchdog_States _Watchdog_Remove(Watchdog_Header *header, Watchdog_Control *the_watchdog)
Removes the_watchdog from the watchdog chain.
Definition: watchdogremove.c:80
void * user_data
This field is an untyped pointer to user data that is passed to the watchdog handler routine...
Definition: watchdog.h:120
RTEMS_INLINE_ROUTINE bool _Watchdog_Is_active(Watchdog_Control *the_watchdog)
This routine returns true if the watchdog timer is in the ACTIVE state, and false otherwise...
Definition: watchdogimpl.h:317
uint32_t Objects_Id
The following type defines the control block used to manage object IDs.
Definition: object.h:122
Objects_Id id
This field is the Id to pass as an argument to the routine.
Definition: watchdog.h:116
#define SCORE_EXTERN
The following ensures that all data is declared in the space of the initialization routine for either...
Definition: basedefs.h:81
SCORE_EXTERN Watchdog_Header _Watchdog_Seconds_header
Watchdog chain which is managed at second boundaries.
Definition: watchdogimpl.h:106
SCORE_EXTERN Watchdog_Header _Watchdog_Ticks_header
Watchdog chain which is managed at ticks.
Definition: watchdogimpl.h:99
RTEMS_INLINE_ROUTINE void _Watchdog_Insert_ticks(Watchdog_Control *the_watchdog, Watchdog_Interval units)
This routine inserts THE_WATCHDOG into the ticks watchdog chain for a time of UNITS ticks...
Definition: watchdogimpl.h:371
Watchdog_Interval delta_interval
The current delta interval of the new watchdog to insert.
Definition: watchdogimpl.h:62