summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Friesel <daniel.friesel@uos.de>2022-05-16 16:25:14 +0200
committerDaniel Friesel <daniel.friesel@uos.de>2022-05-16 16:25:14 +0200
commit1cb46c9d6adbe4271314fddd765d49ce37681ca1 (patch)
tree77c289e745cd855bd126f41453bf4fcfcc4496d9
parent71e891f2284e5afb47ab6d24383058dd97230355 (diff)
treebench: do not use loop mode
-rw-r--r--src/app/treebench/Makefile.inc4
-rw-r--r--src/app/treebench/main.cc17
2 files changed, 8 insertions, 13 deletions
diff --git a/src/app/treebench/Makefile.inc b/src/app/treebench/Makefile.inc
index 0eea52a..1bb6754 100644
--- a/src/app/treebench/Makefile.inc
+++ b/src/app/treebench/Makefile.inc
@@ -3,7 +3,3 @@
# Copyright 2020 Daniel Friesel
#
# SPDX-License-Identifier: CC0-1.0
-
-ifdef app
- loop = 1
-endif
diff --git a/src/app/treebench/main.cc b/src/app/treebench/main.cc
index e2ddfe3..fc8ffc5 100644
--- a/src/app/treebench/main.cc
+++ b/src/app/treebench/main.cc
@@ -11,22 +11,21 @@
#include "tree.c.inc"
-void loop(void)
+int main(void)
{
+ arch.setup();
+ gpio.setup();
+ kout.setup();
+
counter.start();
counter.stop();
kout << "nop @ " << counter.value << "/" << counter.overflow << " cycles" << endl << endl;
run_benchmark();
-}
-
-int main(void)
-{
- arch.setup();
- gpio.setup();
- kout.setup();
- arch.idle_loop();
+ while (1) {
+ arch.idle();
+ }
return 0;
}