SMP::SMPWatchdog Class Reference

This is the watchdog for SMPKernel class. More...

#include <watchdog.h>

Collaboration diagram for SMP::SMPWatchdog:

Collaboration graph
[legend]
List of all members.

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

Detailed Description

This is the watchdog for SMPKernel class.

Note:
Should not use this for gerneral case. This class is friend of SMPKernel, and thus tightly connected to it.


Constructor & Destructor Documentation

SMP::SMPWatchdog::~SMPWatchdog (  ) 

currently empty


Member Function Documentation

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

Warning:
could be the source of race condition. See the cpp file for detail


The documentation for this class was generated from the following files:
Generated on Fri Aug 31 15:42:00 2007 for SCREAMLinuxMiddleware(SLIM) by  doxygen 1.5.1