ensureModel(); \
model->switch_to_master(new ModelAction(ATOMIC_WRITE, position, memory_order_relaxed, obj, (uint64_t) val)); \
*((volatile uint ## size ## _t *)obj) = val; \
- }
+ thread_id_t tid = thread_current()->get_id(); \
+ for(int i=0;i < size / 8;i++) { \
+ recordWrite(tid, (void *)(((char *)obj)+i)); \
+ } \
+}
VOLATILESTORE(8)
VOLATILESTORE(16)
void insertIntoActionList(action_list_t *list, ModelAction *act) {
sllnode<ModelAction*> * rit = list->end();
modelclock_t next_seq = act->get_seq_number();
- if (rit == NULL || (rit->getVal())->get_seq_number() == next_seq)
+ if (rit == NULL || (rit->getVal()->get_seq_number() == next_seq))
list->push_back(act);
else {
for(;rit != NULL;rit=rit->getPrev()) {
- if ((rit->getVal())->get_seq_number() == next_seq) {
+ if (rit->getVal()->get_seq_number() == next_seq) {
list->insertAfter(rit, act);
break;
}
ASSERT(curr);
/* Process this action in ModelHistory for records*/
- model->get_history()->process_action( curr, curr->get_tid() );
+ // model->get_history()->process_action( curr, curr->get_tid() );
if (curr_thrd->is_blocked() || curr_thrd->is_complete())
scheduler->remove_thread(curr_thrd);
if (tail == node) {
tail = node->prev;
} else {
- tail->next->prev = node->prev;
+ node->next->prev = node->prev;
}
mllnode<_Tp> *next = node->next;
delete node;
if (tail == node) {
tail = node->prev;
} else {
- tail->next->prev = node->prev;
+ node->next->prev = node->prev;
}
sllnode<_Tp> *next = node->next;
}
type back() const {
- return array[size - 1];
+ return array[_size - 1];
}
void resize(uint psize) {