RTEMS  5.1
Macros | Enumerations | Functions
watchdogimpl.h File Reference

Inlined Routines in the Watchdog Handler. More...

#include <rtems/score/watchdog.h>
#include <rtems/score/watchdogticks.h>
#include <rtems/score/assert.h>
#include <rtems/score/isrlock.h>
#include <rtems/score/percpu.h>
#include <rtems/score/rbtreeimpl.h>
#include <sys/types.h>
#include <sys/timespec.h>

Go to the source code of this file.

Macros

#define WATCHDOG_INITIALIZER(routine)
 Watchdog initializer for static initialization. More...
 
#define _Watchdog_Tickle(header, first, now, lock, lock_context)   _Watchdog_Do_tickle( header, first, now, lock_context )
 
#define WATCHDOG_MAXIMUM_TICKS   UINT64_MAX
 The maximum watchdog ticks value for the far future.
 
#define WATCHDOG_NANOSECONDS_PER_SECOND   1000000000
 
#define WATCHDOG_BITS_FOR_1E9_NANOSECONDS   30
 The bits necessary to store 1000000000 (= WATCHDOG_NANOSECONDS_PER_SECOND) nanoseconds. More...
 
#define WATCHDOG_MAX_SECONDS   0x3ffffffff
 The maximum number of seconds representable in the nanoseconds watchdog format. More...
 

Enumerations

enum  Watchdog_State { WATCHDOG_SCHEDULED_BLACK, WATCHDOG_SCHEDULED_RED, WATCHDOG_INACTIVE, WATCHDOG_PENDING }
 Watchdog states. More...
 

Functions

RTEMS_INLINE_ROUTINE void _Watchdog_Header_initialize (Watchdog_Header *header)
 Initializes the watchdog header. More...
 
RTEMS_INLINE_ROUTINE Watchdog_Control_Watchdog_Header_first (const Watchdog_Header *header)
 Returns the first of the watchdog header. More...
 
RTEMS_INLINE_ROUTINE void _Watchdog_Header_destroy (Watchdog_Header *header)
 Destroys the watchdog header. More...
 
void _Watchdog_Tick (struct Per_CPU_Control *cpu)
 Performs a watchdog tick. More...
 
RTEMS_INLINE_ROUTINE Watchdog_State _Watchdog_Get_state (const Watchdog_Control *the_watchdog)
 Gets the state of the watchdog. More...
 
RTEMS_INLINE_ROUTINE void _Watchdog_Set_state (Watchdog_Control *the_watchdog, Watchdog_State state)
 Sets the state of the watchdog. More...
 
RTEMS_INLINE_ROUTINE Per_CPU_Control_Watchdog_Get_CPU (const Watchdog_Control *the_watchdog)
 Gets the watchdog's cpu. More...
 
RTEMS_INLINE_ROUTINE void _Watchdog_Set_CPU (Watchdog_Control *the_watchdog, Per_CPU_Control *cpu)
 Sets the cpu for the watchdog. More...
 
RTEMS_INLINE_ROUTINE void _Watchdog_Preinitialize (Watchdog_Control *the_watchdog, Per_CPU_Control *cpu)
 Pre-initializes a watchdog. More...
 
RTEMS_INLINE_ROUTINE void _Watchdog_Initialize (Watchdog_Control *the_watchdog, Watchdog_Service_routine_entry routine)
 Initializes a watchdog with a new service routine. More...
 
void _Watchdog_Do_tickle (Watchdog_Header *header, Watchdog_Control *first, uint64_t now, ISR_lock_Context *lock_context)
 Calls the routine of each not expired watchdog control node. More...
 
void _Watchdog_Insert (Watchdog_Header *header, Watchdog_Control *the_watchdog, uint64_t expire)
 Inserts a watchdog into the set of scheduled watchdogs according to the specified expiration time. More...
 
void _Watchdog_Remove (Watchdog_Header *header, Watchdog_Control *the_watchdog)
 In the case the watchdog is scheduled, then it is removed from the set of scheduled watchdogs. More...
 
RTEMS_INLINE_ROUTINE uint64_t _Watchdog_Cancel (Watchdog_Header *header, Watchdog_Control *the_watchdog, uint64_t now)
 In the case the watchdog is scheduled, then it is removed from the set of scheduled watchdogs. More...
 
RTEMS_INLINE_ROUTINE bool _Watchdog_Is_scheduled (const Watchdog_Control *the_watchdog)
 Checks if the watchdog is scheduled. More...
 
RTEMS_INLINE_ROUTINE void _Watchdog_Next_first (Watchdog_Header *header, Watchdog_Control *the_watchdog)
 Sets the first node of the header. More...
 
RTEMS_INLINE_ROUTINE bool _Watchdog_Is_valid_timespec (const struct timespec *ts)
 Checks if the timespec is a valid timespec for a watchdog. More...
 
RTEMS_INLINE_ROUTINE bool _Watchdog_Is_valid_interval_timespec (const struct timespec *ts)
 Checks if the timespec is a valid interval timespec for a watchdog. More...
 
RTEMS_INLINE_ROUTINE const struct timespec * _Watchdog_Future_timespec (struct timespec *now, const struct timespec *delta)
 Adds the delta timespec to the current time if the delta is a valid interval timespec. More...
 
RTEMS_INLINE_ROUTINE bool _Watchdog_Is_far_future_timespec (const struct timespec *ts)
 Checks if the timespec is too far in the future. More...
 
RTEMS_INLINE_ROUTINE uint64_t _Watchdog_Ticks_from_seconds (uint32_t seconds)
 Converts the seconds to ticks. More...
 
RTEMS_INLINE_ROUTINE uint64_t _Watchdog_Ticks_from_timespec (const struct timespec *ts)
 Converts the timespec in ticks. More...
 
RTEMS_INLINE_ROUTINE uint64_t _Watchdog_Ticks_from_sbintime (int64_t sbt)
 Converts the sbintime in ticks. More...
 
RTEMS_INLINE_ROUTINE void _Watchdog_Per_CPU_acquire_critical (Per_CPU_Control *cpu, ISR_lock_Context *lock_context)
 Acquires the per cpu watchdog lock in a critical section. More...
 
RTEMS_INLINE_ROUTINE void _Watchdog_Per_CPU_release_critical (Per_CPU_Control *cpu, ISR_lock_Context *lock_context)
 Releases the per cpu watchdog lock in a critical section. More...
 
RTEMS_INLINE_ROUTINE uint64_t _Watchdog_Per_CPU_insert_ticks (Watchdog_Control *the_watchdog, Per_CPU_Control *cpu, Watchdog_Interval ticks)
 Sets the watchdog's cpu to the given instance and sets its expiration time to the watchdog expiration time of the cpu plus the ticks. More...
 
RTEMS_INLINE_ROUTINE uint64_t _Watchdog_Per_CPU_insert (Watchdog_Control *the_watchdog, Per_CPU_Control *cpu, Watchdog_Header *header, uint64_t expire)
 Sets the watchdog's cpu and inserts it with the given expiration time in the scheduled watchdogs. More...
 
RTEMS_INLINE_ROUTINE void _Watchdog_Per_CPU_remove (Watchdog_Control *the_watchdog, Per_CPU_Control *cpu, Watchdog_Header *header)
 Removes the watchdog from the cpu and the scheduled watchdogs. More...
 
RTEMS_INLINE_ROUTINE void _Watchdog_Per_CPU_remove_ticks (Watchdog_Control *the_watchdog)
 Removes the watchdog from the cpu and the scheduled watchdogs. More...
 

Detailed Description

Inlined Routines in the Watchdog Handler.

This file contains the static inline implementation of all inlined routines in the Watchdog Handler.