#include <watchdog.h>
Collaboration diagram for SMP::SMPWatchdog:
Public Member Functions | |
SMPWatchdog (SMPKernel *k, int timeout) | |
the watchdog, when called, should own a pointer to the SMP kernel | |
~SMPWatchdog () | |
int | start () |
int | stop () |
void | pat (int id) |
void | set_timeout (int sec) |
int | get_timeout () |
void | pat () |
void | stir_up () |
bool | is_happy () |
int * | get_bad_ids (int *num) |
int | add_not_monitored (int fid) |
void | update_watch_size () |
update watchdog's size of watch list |
SMP::SMPWatchdog::~SMPWatchdog | ( | ) |
currently empty
int SMP::SMPWatchdog::start | ( | ) |
start the watchdog thread
int SMP::SMPWatchdog::stop | ( | ) |
stop the watchdog thread
void SMP::SMPWatchdog::pat | ( | int | id | ) | [inline] |
raise a specific flag of the id
void SMP::SMPWatchdog::set_timeout | ( | int | sec | ) | [inline] |
set timeout in seconds
int SMP::SMPWatchdog::get_timeout | ( | ) | [inline] |
get timeout setting
void SMP::SMPWatchdog::pat | ( | ) | [inline] |
raise all the flags of watched threads
void SMP::SMPWatchdog::stir_up | ( | ) | [inline] |
to stir up the dog, meaning to make all watched thread's flag down
bool SMP::SMPWatchdog::is_happy | ( | ) | [inline] |
check if all threads have raised the flag, meaning that the system is fine if any thread's flag is down, the dog is unhappy, meaning that some problem is there
int * SMP::SMPWatchdog::get_bad_ids | ( | int * | num | ) | [inline] |
this function returns an integer array of id of the threads whose flag is down, of the size num in the parameter
int SMP::SMPWatchdog::add_not_monitored | ( | int | fid | ) | [inline] |
add a filter id into the not-monitored list, each item in the vector should be unique
void SMP::SMPWatchdog::update_watch_size | ( | ) |
update watchdog's size of watch list