Main Page | Modules | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members | File Members

watchdog.h

Go to the documentation of this file.
00001 // AUTOMATICALLY GENERATED -- DO NOT EDIT!         -*- c++ -*-
00002 
00003 #ifndef watchdog_h
00004 #define watchdog_h
00005 
00006 #include "types.h"
00007 #include "initcalls.h"
00008 
00009 //
00010 // INTERFACE definition follows 
00011 //
00012 
00013 
00014 class Watchdog
00015 {
00016 public:
00017   static void (*touch)(void);
00018   static void (*enable)(void);
00019   static void (*disable)(void);
00020 
00021 private:
00022   Watchdog();                        // default constructors are undefined
00023   Watchdog(const Watchdog&);
00024 
00025   typedef struct
00026     {
00027       unsigned active:1;
00028       unsigned user_active:1;
00029       unsigned no_user_control:1;
00030     } Watchdog_flags;
00031 
00032   static Watchdog_flags flags;
00033 
00034 public:  
00035   // user enables Watchdog
00036   static inline void user_enable();
00037   
00038   // user disables Watchdog
00039   static inline void user_disable();
00040   
00041   // user takes over control of Watchdog
00042   static inline void user_takeover_control();
00043   
00044   // user gives back control of Watchdog
00045   static inline void user_giveback_control();
00046   
00047   static void FIASCO_INIT init();
00048 
00049 private:  
00050   static void do_nothing();
00051   
00052   static void perf_enable();
00053   
00054   static void perf_disable();
00055   
00056   static void perf_touch();
00057 };
00058 
00059 //
00060 // IMPLEMENTATION includes follow (for use by inline functions)
00061 //
00062 
00063 #include "perf_cnt.h"
00064 
00065 //
00066 // IMPLEMENTATION of inline functions (and needed classes)
00067 //
00068 
00069 
00070 
00071 // user enables Watchdog
00072 
00073 inline void
00074 Watchdog::user_enable()
00075 {
00076   flags.user_active = 1;
00077   Perf_cnt::start_watchdog();
00078 }
00079 
00080 
00081 // user disables Watchdog
00082 
00083 inline void
00084 Watchdog::user_disable()
00085 {
00086   flags.user_active = 0;
00087   Perf_cnt::stop_watchdog();
00088 }
00089 
00090 
00091 // user takes over control of Watchdog
00092 
00093 inline void
00094 Watchdog::user_takeover_control()
00095 { flags.no_user_control = 0; }
00096 
00097 
00098 // user gives back control of Watchdog
00099 
00100 inline void
00101 Watchdog::user_giveback_control()
00102 { flags.no_user_control = 0; }
00103 
00104 #endif // watchdog_h

Generated on Mon Sep 26 14:20:12 2005 for Fiasco by  doxygen 1.4.2