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.
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();
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
{
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())
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: