[GIT] ppl/ppl(master): Drafted a few missing comments. To be completed ( by the author).

Module: ppl/ppl Branch: master Commit: db905fa95a0e199beb2b9337869a2e27219060f8 URL: http://www.cs.unipr.it/git/gitweb.cgi?p=ppl/ppl.git;a=commit;h=db905fa95a0e1...
Author: Enea Zaffanella zaffanella@cs.unipr.it Date: Mon Jul 13 16:21:35 2009 +0200
Drafted a few missing comments. To be completed (by the author).
---
Watchdog/src/Watchdog.defs.hh | 38 +++++++++++++++++++++++++------------- 1 files changed, 25 insertions(+), 13 deletions(-)
diff --git a/Watchdog/src/Watchdog.defs.hh b/Watchdog/src/Watchdog.defs.hh index 5031a98..1d68f30 100644 --- a/Watchdog/src/Watchdog.defs.hh +++ b/Watchdog/src/Watchdog.defs.hh @@ -52,28 +52,39 @@ public: template <typename Flag_Base, typename Flag> Watchdog(unsigned int units, const Flag_Base* volatile& holder, Flag& flag);
+ /*! \brief + Constructor: if not reset, the watchdog will trigger after \p units + hundreths of seconds, invoking handler \p function. + */ Watchdog(unsigned int units, void (*function)()); + + //! Destructor. ~Watchdog();
private: typedef Pending_List<Watchdog_Traits> WD_Pending_List; friend class Init; + + //! Static class initialization. static void initialize(); + //! Static class finalization. static void finalize();
+ //! Whether or not this watchdog has expired. bool expired; + const Handler& handler; WD_Pending_List::Iterator pending_position;
-private: - // Just to prevent their use. + // Private and not implemented: copy construction is not allowed. Watchdog(const Watchdog&); + // Private and not implemented: copy assignment is not allowed. Watchdog& operator=(const Watchdog&);
// Pass this to getitimer(). static itimerval current_timer_status;
- // Get the timer value. + //! Reads the timer value into \p time. static void get_timer(Time& time);
// Pass this to setitimer(). @@ -82,13 +93,13 @@ private: // Last time value we set the timer to. static Time last_time_requested;
- // Set the timer value. + //! Sets the timer value to \p time. static void set_timer(const Time& time);
- // Stops the timer. + //! Stops the timer. static void stop_timer();
- // Quick reschedule to avoid race conditions. + //! Quick reschedule to avoid race conditions. static void reschedule();
// Used by the above. @@ -103,18 +114,19 @@ private: //! The actual signal handler. static void handle_timeout(int);
- // Handle the addition of a new watchdog event. - static WD_Pending_List::Iterator new_watchdog_event(unsigned int units, - const Handler& handler, - bool& expired_flag); + //! Handles the addition of a new watchdog event. + static WD_Pending_List::Iterator + new_watchdog_event(unsigned int units, + const Handler& handler, + bool& expired_flag);
- // Handle the removal of a watchdog event. + //! Handles the removal of the watchdog event referred by \p position. void remove_watchdog_event(WD_Pending_List::Iterator position);
- // Whether the alarm clock is running. + //! Whether the alarm clock is running. static volatile bool alarm_clock_running;
- // Whether we are changing data that is also changed by the signal handler. + //! Whether we are changing data that is also changed by the signal handler. static volatile bool in_critical_section;
friend void PWL_handle_timeout(int signum);
participants (1)
-
Enea Zaffanella