diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2015-05-04 11:02:56 -0700 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2015-05-04 11:02:56 -0700 |
commit | a66c9ae68122e04637d65c7f3aedcd96012c8cb6 (patch) | |
tree | ceddf9f22c55621be86768a0aeedc927495e62d6 /cpp/039wait.cc | |
parent | de49fb426aa44984d308f5856ec836360ba0bdce (diff) | |
download | mu-a66c9ae68122e04637d65c7f3aedcd96012c8cb6.tar.gz |
1249 - new type: index_t
It will always be identical to size_t, just more readable, like recipe_number, etc. The various unsigned types are sizes, indices (which often compare with sizes for bounds checking), numbers which are canonical elements of a specific space (like recipes or mu types), and ids which I haven't introduced yet.
Diffstat (limited to 'cpp/039wait.cc')
-rw-r--r-- | cpp/039wait.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/cpp/039wait.cc b/cpp/039wait.cc index b273c737..b9208590 100644 --- a/cpp/039wait.cc +++ b/cpp/039wait.cc @@ -23,7 +23,7 @@ recipe f2 [ WAITING, :(before "End routine Fields") // only if state == WAITING -size_t waiting_on_location; +index_t waiting_on_location; int old_value_of_wating_location; :(before "End routine Constructor") waiting_on_location = old_value_of_wating_location = 0; @@ -47,7 +47,7 @@ case WAIT_FOR_LOCATION: { //: scheduler tweak to get routines out of that state :(before "End Scheduler State Transitions") -for (size_t i = 0; i < Routines.size(); ++i) { +for (index_t i = 0; i < Routines.size(); ++i) { if (Routines[i]->state != WAITING) continue; if (Memory[Routines[i]->waiting_on_location] != Routines[i]->old_value_of_wating_location) { trace("schedule") << "waking up routine\n"; |