about summary refs log tree commit diff stats
path: root/038scheduler.cc
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2015-05-10 06:02:36 -0700
committerKartik K. Agaram <vc@akkartik.com>2015-05-10 06:02:36 -0700
commit134dad7c4bbabb4770727240b150d566aa041567 (patch)
treef3d4bbe57724ead899048554a3157a569b01e856 /038scheduler.cc
parentcf9af278782a0ac030a249c5f5c95c0868956123 (diff)
downloadmu-134dad7c4bbabb4770727240b150d566aa041567.tar.gz
1321 - *finally*, fixed the chessboard sluggishness
Diffstat (limited to '038scheduler.cc')
-rw-r--r--038scheduler.cc17
1 files changed, 17 insertions, 0 deletions
diff --git a/038scheduler.cc b/038scheduler.cc
index c67dfdae..99ced920 100644
--- a/038scheduler.cc
+++ b/038scheduler.cc
@@ -325,6 +325,23 @@ case RESTART: {
 }
 
 :(before "End Primitive Recipe Declarations")
+STOP,
+:(before "End Primitive Recipe Numbers")
+Recipe_number["stop"] = STOP;
+:(before "End Primitive Recipe Implementations")
+case STOP: {
+  assert(ingredients.at(0).size() == 1);  // routine id must be scalar
+  index_t id = ingredients.at(0).at(0);
+  for (index_t i = 0; i < Routines.size(); ++i) {
+    if (Routines.at(i)->id == id) {
+      Routines.at(i)->state = COMPLETED;
+      break;
+    }
+  }
+  break;
+}
+
+:(before "End Primitive Recipe Declarations")
 _DUMP_ROUTINES,
 :(before "End Primitive Recipe Numbers")
 Recipe_number["$dump-routines"] = _DUMP_ROUTINES;