RTEMS: cpukit/include/rtems/score/watchdogimpl.h File Reference

| RTEMS 5.4-rc2

Loading...
Searching...
No Matches
Macros | Enumerations | Functions
watchdogimpl.h File Reference
Internal » SuperCore » Watchdog Handler

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.
#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.
#define | WATCHDOG_MAX_SECONDS 0x3ffffffff
| The maximum number of seconds representable in the nanoseconds watchdog format.

## 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.
RTEMS_INLINE_ROUTINE Watchdog_Control * | _Watchdog_Header_first (const Watchdog_Header *header)
| Returns the first of the watchdog header.
RTEMS_INLINE_ROUTINE void | _Watchdog_Header_destroy (Watchdog_Header *header)
| Destroys the watchdog header.
void | _Watchdog_Tick (struct Per_CPU_Control *cpu)
| Performs a watchdog tick.
RTEMS_INLINE_ROUTINE Watchdog_State | _Watchdog_Get_state (const Watchdog_Control *the_watchdog)
| Gets the state of the watchdog.
RTEMS_INLINE_ROUTINE void | _Watchdog_Set_state (Watchdog_Control *the_watchdog, Watchdog_State state)
| Sets the state of the watchdog.
RTEMS_INLINE_ROUTINE Per_CPU_Control * | _Watchdog_Get_CPU (const Watchdog_Control *the_watchdog)
| Gets the watchdog's cpu.
RTEMS_INLINE_ROUTINE void | _Watchdog_Set_CPU (Watchdog_Control *the_watchdog, Per_CPU_Control *cpu)
| Sets the cpu for the watchdog.
RTEMS_INLINE_ROUTINE void | _Watchdog_Preinitialize (Watchdog_Control *the_watchdog, Per_CPU_Control *cpu)
| Pre-initializes a watchdog.
RTEMS_INLINE_ROUTINE void | _Watchdog_Initialize (Watchdog_Control *the_watchdog, Watchdog_Service_routine_entry routine)
| Initializes a watchdog with a new service routine.
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.
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.
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.
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.
RTEMS_INLINE_ROUTINE bool | _Watchdog_Is_scheduled (const Watchdog_Control *the_watchdog)
| Checks if the watchdog is scheduled.
RTEMS_INLINE_ROUTINE void | _Watchdog_Next_first (Watchdog_Header *header, Watchdog_Control *the_watchdog)
| Sets the first node of the header.
RTEMS_INLINE_ROUTINE bool | _Watchdog_Is_valid_timespec (const struct timespec *ts)
| Checks if the timespec is a valid timespec for a watchdog.
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.
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.
RTEMS_INLINE_ROUTINE bool | _Watchdog_Is_far_future_timespec (const struct timespec *ts)
| Checks if the timespec is too far in the future.
RTEMS_INLINE_ROUTINE uint64_t | _Watchdog_Ticks_from_seconds (uint32_t seconds)
| Converts the seconds to ticks.
RTEMS_INLINE_ROUTINE uint64_t | _Watchdog_Ticks_from_timespec (const struct timespec *ts)
| Converts the timespec in ticks.
RTEMS_INLINE_ROUTINE uint64_t | _Watchdog_Ticks_from_sbintime (int64_t sbt)
| Converts the sbintime in ticks.
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.
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.
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.
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.
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.
RTEMS_INLINE_ROUTINE void | _Watchdog_Per_CPU_remove_ticks (Watchdog_Control *the_watchdog)
| Removes the watchdog from the cpu and the scheduled watchdogs.

## Detailed Description

Inlined Routines in the Watchdog Handler.

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