summaryrefslogtreecommitdiff
path: root/lib/Kratos/DFADriver.pm
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2017-05-29 13:01:13 +0200
committerDaniel Friesel <derf@finalrewind.org>2017-05-29 13:01:13 +0200
commit8e3db3507ef0d3f11d98628a8e36468cefa7df73 (patch)
treedd74805b43e4af6bc8b263e8ee6a9b0e2287b68c /lib/Kratos/DFADriver.pm
parentc035e7855da16ec1cbccf9655d1ebf9d632b687c (diff)
DFADriver: DriverEvalThread_{class} für Benchmarkwerte per Klassenslice
Diffstat (limited to 'lib/Kratos/DFADriver.pm')
-rw-r--r--lib/Kratos/DFADriver.pm16
1 files changed, 9 insertions, 7 deletions
diff --git a/lib/Kratos/DFADriver.pm b/lib/Kratos/DFADriver.pm
index e06d577..f238ba4 100644
--- a/lib/Kratos/DFADriver.pm
+++ b/lib/Kratos/DFADriver.pm
@@ -877,7 +877,7 @@ EOF
sub to_test_ah {
my ($self) = @_;
- my $buf = <<'EOF';
+ my $buf = <<"EOF";
/*
* Autogenerated code -- Manual changes are not preserved
@@ -906,6 +906,7 @@ EOF
sub to_test_cc {
my ($self) = @_;
+ my $class_name = $self->{class_name};
my @runs = $self->dfa->traces;
my @state_enum = $self->model->get_state_enum;
my $dfa = $self->dfa->dfa;
@@ -924,12 +925,12 @@ sub to_test_cc {
#include "DriverEval.h"
#include "syscall/guarded_buzzer.h"
-DeclareThread(DriverEvalThread, driverEvalThread, 256);
+DeclareThread(DriverEvalThread_${class_name}, driverEvalThread, 256);
EOF
$buf .= <<"EOF";
-void DriverEvalThread::action()
+void DriverEvalThread_${class_name}::action()
{
Guarded_Buzzer buzzer;
@@ -984,9 +985,10 @@ EOF
sub to_test_h {
my ($self) = @_;
+ my $class_name = $self->{class_name};
my $class_prefix
- = $self->repo->get_class_path_prefix( $self->{class_name} );
+ = $self->repo->get_class_path_prefix( $class_name );
my $buf = <<"EOF";
@@ -1001,13 +1003,13 @@ sub to_test_h {
#include "${class_prefix}.h"
#include "syscall/thread.h"
-class DriverEvalThread : public Thread {
+class DriverEvalThread_${class_name} : public Thread {
public:
- DriverEvalThread(void* tos) : Thread(tos) { }
+ DriverEvalThread_${class_name}(void* tos) : Thread(tos) { }
void action();
};
-extern DriverEvalThread driverEvalThread;
+extern DriverEvalThread_${class_name} driverEvalThread;
#endif