moving terminate() to SimulatorController

git-svn-id: https://www4.informatik.uni-erlangen.de/i4svn/danceos/trunk/devel/fail@1017 8c4709b5-6ec9-48aa-a5cd-a96041d1645a
This commit is contained in:
hsc
2012-04-03 14:05:12 +00:00
parent 3f6ffafbfa
commit 8095335bf3
6 changed files with 9 additions and 24 deletions

View File

@ -282,4 +282,12 @@ T* SimulatorController::getExperimentData()
return (concreteExpDat);
}
void SimulatorController::terminate(int exCode)
{
// Attention: This could cause problems, e.g., because of non-closed sockets
std::cout << "[FAIL] Exit called by experiment with exit code: " << exCode << std::endl;
// TODO: (Non-)Verbose-Mode?
exit(exCode);
}
} // end-of-namespace: sal

View File

@ -139,7 +139,7 @@ class SimulatorController
* Terminate simulator
* @param exCode Individual exit code
*/
virtual void terminate(int exCode = EXIT_SUCCESS) = 0;
virtual void terminate(int exCode = EXIT_SUCCESS);
/**
* Check whether the interrupt should be suppressed.
* @param interruptNum the interrupt-type id

View File

@ -170,14 +170,6 @@ void BochsController::rebootDone()
m_Flows.toggle(m_CurrFlow);
}
void BochsController::terminate(int exCode)
{
// Attention: This could cause Problems, e.g. because of non-closed sockets
std::cout << "[FAIL] Exit called by experiment with exit code: " << exCode << std::endl;
// TODO: (Non-)Verbose-Mode?
exit(exCode);
}
void BochsController::fireInterrupt(unsigned irq)
{
interrupt_injection_request = true;

View File

@ -8,7 +8,6 @@
#include <iostream>
#include <iomanip>
#include <string.h>
#include <stdlib.h>
#include "failbochs.hpp"
@ -87,11 +86,6 @@ class BochsController : public SimulatorController
* Reboot finished: Callback from Simulator
*/
void rebootDone();
/**
* Terminate simulator
* @param exCode Individual exit code
*/
void terminate(int exCode = EXIT_SUCCESS);
/**
* Fire an interrupt.
* @param irq Interrupt to be fired

View File

@ -127,10 +127,6 @@ void OVPController::toPreviousCtx()
// TODO
}
void OVPController::terminate(int exCode){
}
void OVPController::fireTimer(uint32_t){

View File

@ -66,11 +66,6 @@ class OVPController : public SimulatorController
* @return the current eip
*/
/**
* Terminate simulator
*/
virtual void terminate(int exCode = EXIT_SUCCESS);
virtual void fireTimer(uint32_t);
void makeGPRegister(int, void*, const string&);