Files
fail/src/experiments/instantiate-experiment.ah.in
Horst Schirmeier 12b539ff75 misc cleanups
This change touches several subsystems, tools and experiments
(sal, util, cmake, import-trace, generic-tracing, nanojpeg), and
changes details not worth separate commits.

Change-Id: Icd1d664d1be5cfc2212dbf77801c271183214d08
2013-09-10 17:37:25 +02:00

20 lines
729 B
Plaintext

#ifndef __INSTANTIATE_@EXPERIMENT_TYPE@_AH__
#define __INSTANTIATE_@EXPERIMENT_TYPE@_AH__
// Make sure your experiment declaration is in experiment.hpp:
#include "../experiments/@EXPERIMENT_NAME@/experiment.hpp"
#include "sal/SALInst.hpp"
// The experiment needs to be instantiated dynamically (on the stack, or the
// heap), as the ExperimentFlow destructor deregisters from the
// CoroutineManager which may not exist anymore if the global
// construction/destruction order is inappropriate.
aspect @EXPERIMENT_TYPE@ExperimentHook {
advice execution ("void fail::SimulatorController::initExperiments()") : after () {
fail::simulator.addFlow(new @EXPERIMENT_TYPE@);
}
};
#endif // __INSTANTIATE_@EXPERIMENT_TYPE@_AH__