From: Brian Norris Date: Fri, 27 Apr 2012 06:35:44 +0000 (-0700) Subject: model: fixup thread ID selection X-Git-Tag: pldi2013~489 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=8fecd5d2f3d65a38efd01f537948a717171d7e08;p=model-checker.git model: fixup thread ID selection --- diff --git a/model.cc b/model.cc index f1bc320..3d41a2e 100644 --- a/model.cc +++ b/model.cc @@ -4,12 +4,14 @@ #include "schedule.h" #include "common.h" +#define INITIAL_THREAD_ID 0 + ModelChecker *model; ModelChecker::ModelChecker() { - /* First thread created (system_thread) will have id 1 */ - this->used_thread_id = 0; + /* First thread created will have id (INITIAL_THREAD_ID + 1) */ + this->used_thread_id = INITIAL_THREAD_ID; /* Initialize default scheduler */ this->scheduler = new Scheduler(); @@ -41,7 +43,7 @@ void ModelChecker::reset_to_initial_state() action_trace = new action_list_t(); currentNode = rootNode; current_action = NULL; - used_thread_id = 1; // ? + used_thread_id = INITIAL_THREAD_ID; /* scheduler reset ? */ }