From: Brian Norris Date: Mon, 25 Feb 2013 05:38:21 +0000 (-0800) Subject: Revert "fix scheduling stuff to get nice round robin scheduler behavior..." X-Git-Tag: oopsla2013~223^2 X-Git-Url: http://plrg.eecs.uci.edu/git/?p=model-checker.git;a=commitdiff_plain;h=ff1d424096506e2fe30b15286afb84a95cd05703 Revert "fix scheduling stuff to get nice round robin scheduler behavior..." This reverts commit 30999f20b8426081e676adfc76d1c4af7b941e8e. This commit triggers assertions and therefore cannot be used: $ ./run.sh test/rmwprog.o + test/rmwprog.o Error: assertion failed in model.cc at line 2424 stack trace: ./libmodel.so : ModelChecker::resolve_promises(ModelAction*)+0x3bd ./libmodel.so : ModelChecker::process_write(ModelAction*)+0x21 ./libmodel.so : ModelChecker::check_current_action(ModelAction*)+0x42b ./libmodel.so : ModelChecker::take_step(ModelAction*)+0x39 ./libmodel.so : ModelChecker::run()+0xa5 ./libmodel.so : ()+0x1a3a3 ./libmodel.so : ()+0x1e786 ./libmodel.so : main()+0x3c /lib/x86_64-linux-gnu/libc.so.6 : __libc_start_main()+0xed test/rmwprog.o() [0x400789] Execution 11: INFEASIBLE: [unresolved promise] --------------------------------------------------------------------- ( 0) Thread: 0 Action: uninitialized MO: relaxed Loc: 0x601078 Value: 0 CV: ( 0, 0) ( 1) Thread: 1 Action: thread start MO: seq_cst Loc: 0x7f6cd2016898 Value: 0xdeadbeef CV: ( 0, 1) ( 2) Thread: 1 Action: init atomic MO: relaxed Loc: 0x601078 Value: 0 CV: ( 0, 2) ( 3) Thread: 1 Action: thread create MO: seq_cst Loc: 0x7f6cd1410590 Value: 0x7f6cd1410560 CV: ( 0, 3) ( 4) Thread: 2 Action: thread start MO: seq_cst Loc: 0x7f6cd2016e08 Value: 0xdeadbeef CV: ( 0, 3, 4) ( 5) Thread: 2 Action: atomic rmw MO: relaxed Loc: 0x601078 Value: 0x1 Rf: 9 CV: ( 0, 3, 5) ( 6) Thread: 1 Action: thread create MO: seq_cst Loc: 0x7f6cd14105a0 Value: 0x7f6cd1410560 CV: ( 0, 6, 0) ( 7) Thread: 3 Action: thread start MO: seq_cst Loc: 0x7f6cd2017338 Value: 0xdeadbeef CV: ( 0, 6, 0, 7) ( 8) Thread: 2 Action: atomic rmw MO: relaxed Loc: 0x601078 Value: 0x2 Rf: 5 CV: ( 0, 3, 8, 0) ( 9) Thread: 3 Action: atomic rmw MO: relaxed Loc: 0x601078 Value: 0 Rf: 2 CV: ( 0, 6, 0, 9) HASH 1973598524 --------------------------------------------------------------------- Add breakpoint to line 50 in file common.cc. --- diff --git a/model.cc b/model.cc index 7fdc824..ae37889 100644 --- a/model.cc +++ b/model.cc @@ -282,8 +282,6 @@ Thread * ModelChecker::get_next_thread(ModelAction *curr) earliest_diverge = prevnode->get_action(); } } - /* Start the round robin scheduler from this thread id */ - scheduler->set_scheduler_thread(tid); /* The correct sleep set is in the parent node. */ execute_sleep_set(); diff --git a/schedule.cc b/schedule.cc index 8d44eec..e874903 100644 --- a/schedule.cc +++ b/schedule.cc @@ -207,10 +207,6 @@ Thread * Scheduler::select_next_thread() return NULL; } -void Scheduler::set_scheduler_thread(thread_id_t tid) { - curr_thread_index=id_to_int(tid); -} - /** * @brief Set the current "running" Thread * @param t Thread to run @@ -219,7 +215,7 @@ void Scheduler::set_current_thread(Thread *t) { ASSERT(t && !t->is_model_thread()); - // curr_thread_index = id_to_int(t->get_id()); + curr_thread_index = id_to_int(t->get_id()); current = t; if (DBG_ENABLED()) diff --git a/schedule.h b/schedule.h index 6ae2d2b..121da08 100644 --- a/schedule.h +++ b/schedule.h @@ -39,8 +39,6 @@ public: bool is_enabled(const Thread *t) const; bool is_enabled(thread_id_t tid) const; bool is_sleep_set(const Thread *t) const; - void set_scheduler_thread(thread_id_t tid); - SNAPSHOTALLOC private: