RTEMS: cpukit/include/rtems/score/watchdog.h Source File

| RTEMS 5.4-rc2

Loading...
Searching...
No Matches
watchdog.h
Go to the documentation of this file.
1
13/*
14 * COPYRIGHT (c) 1989-2009.
15 * On-Line Applications Research Corporation (OAR).
16 *
17 * The license and distribution terms for this file may be
18 * found in the file LICENSE in this distribution or at
19 * http://www.rtems.org/license/LICENSE.
20 */
21
22#ifndef _RTEMS_SCORE_WATCHDOG_H
23#define _RTEMS_SCORE_WATCHDOG_H
24
25#include <rtems/score/basedefs.h>
26#include <rtems/score/chain.h>
27#include <rtems/score/rbtree.h>
28
29struct Per_CPU_Control;
30
31#ifdef __cplusplus
32extern "C" {
33#endif
34
51typedef struct Watchdog_Control Watchdog_Control;
52
58 typedef void Watchdog_Service_routine;
59
65 typedef Watchdog_Service_routine
66 ( *Watchdog_Service_routine_entry )( Watchdog_Control * );
67
71 typedef struct {
75 RBTree_Control Watchdogs;
76
81 RBTree_Node *first;
82} Watchdog_Header;
83
90 struct Watchdog_Control {
94 union {
99 RBTree_Node RBTree;
100
105 Chain_Node Chain;
106 } Node;
107
108#if defined(RTEMS_SMP)
110 struct Per_CPU_Control *cpu;
111#endif
112
114 Watchdog_Service_routine_entry routine;
115
117 uint64_t expire;
118};
119
122#ifdef __cplusplus
123}
124#endif
125
126#endif
127/* end of include file */
basedefs.h
Basic Definitions.
Watchdog_Service_routine
void Watchdog_Service_routine
Return type from a Watchdog Service Routine.
Definition: watchdog.h:58
Watchdog_Service_routine_entry
Watchdog_Service_routine(* Watchdog_Service_routine_entry)(Watchdog_Control *)
Pointer to a watchdog service routine.
Definition: watchdog.h:66
rbtree.h
Constants and Structures Associated with the Red-Black Tree Handler.
chain.h
Chain Handler API.
Chain_Node_struct
Definition: chain.h:68
Per_CPU_Control
Per CPU Core Structure.
Definition: percpu.h:347
RBTree_Node
Red-black tree node.
Definition: rbtree.h:55
Watchdog_Control
The control block used to manage each watchdog timer.
Definition: watchdog.h:90
Watchdog_Control::RBTree
RBTree_Node RBTree
this field is a red-black tree node structure and allows this to be placed on a red-black tree used t...
Definition: watchdog.h:99
Watchdog_Control::expire
uint64_t expire
This field is the expiration time point.
Definition: watchdog.h:117
Watchdog_Control::Node
union Watchdog_Control::@3988 Node
Nodes for the watchdog.
Watchdog_Control::routine
Watchdog_Service_routine_entry routine
This field is the function to invoke.
Definition: watchdog.h:114
Watchdog_Control::Chain
Chain_Node Chain
this field is a chain node structure and allows this to be placed on a chain used to manage pending w...
Definition: watchdog.h:105
Watchdog_Header
The watchdog header to manage scheduled watchdogs.
Definition: watchdog.h:71
Watchdog_Header::first
RBTree_Node * first
The scheduled watchdog with the earliest expiration time or NULL in case no watchdog is scheduled.
Definition: watchdog.h:81
Watchdog_Header::Watchdogs
RBTree_Control Watchdogs
Red-black tree of scheduled watchdogs sorted by expiration time.
Definition: watchdog.h:75