SMP::SMPSignalManager Class Reference

the class which manages signal passing in SMP kernel More...

#include <signalmanager.h>

Collaboration diagram for SMP::SMPSignalManager:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 SMPSignalManager (SMPKernel *k)
 ~SMPSignalManager ()
void register_thread (int fid, pthread_t tid)
 at first, kernel should register to this manager about filters to watch for, so that the signal manager can know what to watch
void start ()
void stop (bool wait_handler)
void clear ()
void monitor (int id)
void signal (int id)
int get_thread_id (int fid)
int get_filter_id (int id)
void set_timeout_f (int fid, int ms)
int get_timeout_f (int fid)

Static Public Member Functions

static int get_timeout (int id)

Detailed Description

the class which manages signal passing in SMP kernel


Constructor & Destructor Documentation

SMP::SMPSignalManager::SMPSignalManager ( SMPKernel k  ) 

constructor

SMP::SMPSignalManager::~SMPSignalManager (  ) 

destructor


Member Function Documentation

void SMP::SMPSignalManager::register_thread ( int  fid,
pthread_t  tid 
)

at first, kernel should register to this manager about filters to watch for, so that the signal manager can know what to watch

Parameters:
fid the filter to be watched, the filter should have signal-type input port implemented
tid the thread id of the filter's signal_handler() thread
Warning:
all the registration process (call to this function) should be finished before calling start()

void SMP::SMPSignalManager::start (  ) 

start the manager for watching, this will spawn as many watchdog threads as the number of signal_handler threads in SMP kernel

void SMP::SMPSignalManager::stop ( bool  wait_handler  ) 

stop the manager, which stops and kills all watchdog threads in the scope of the SMP execution

void SMP::SMPSignalManager::clear (  ) 

clear the vectors which stores information about the signal threads to watch

void SMP::SMPSignalManager::monitor ( int  id  ) 

this function is used to signal for start-of-watch of a signal_handler's execution

void SMP::SMPSignalManager::signal ( int  id  ) 

this function is used to signal for end-of-watch of a signal_handler's execution

int SMP::SMPSignalManager::get_thread_id ( int  fid  ) 

get the inner id of watchdog thread in signal manager, given the filter id defined in SMP kernel

int SMP::SMPSignalManager::get_filter_id ( int  id  )  [inline]

get the filter id defined in SMP kernel, given the inner id of watchdog thread in signal manager

void SMP::SMPSignalManager::set_timeout_f ( int  fid,
int  ms 
) [inline]

for filter to set its signal_handler watchdog's timeout value

int SMP::SMPSignalManager::get_timeout_f ( int  fid  )  [inline]

for filter to get the timeout value

int SMP::SMPSignalManager::get_timeout ( int  id  )  [inline, static]

for the monitor_thread (the watchdog) to get the timeout of a watchdog for a specific filter


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