*/
static void fixup_action_list(SnapVector<action_list_t> * vec)
{
- for (uint i = 0; i < vec->size(); i++) {
+ for (uint i = 0;i < vec->size();i++) {
action_list_t * list = &(*vec)[i];
if (list != NULL)
list->fixupParent();
static inline void record_atomic_stats(ModelAction * act)
{
switch (act->get_type()) {
- case ATOMIC_WRITE:
- atomic_store_count++;
- break;
- case ATOMIC_RMW:
- atomic_load_count++;
- break;
- case ATOMIC_READ:
- atomic_rmw_count++;
- break;
- case ATOMIC_FENCE:
- atomic_fence_count++;
- break;
- case ATOMIC_LOCK:
- atomic_lock_count++;
- break;
- case ATOMIC_TRYLOCK:
- atomic_trylock_count++;
- break;
- case ATOMIC_UNLOCK:
- atomic_unlock_count++;
- break;
- case ATOMIC_NOTIFY_ONE:
- case ATOMIC_NOTIFY_ALL:
- atomic_notify_count++;
- break;
- case ATOMIC_WAIT:
- atomic_wait_count++;
- break;
- case ATOMIC_TIMEDWAIT:
- atomic_timedwait_count++;
- default:
- return;
+ case ATOMIC_WRITE:
+ atomic_store_count++;
+ break;
+ case ATOMIC_RMW:
+ atomic_load_count++;
+ break;
+ case ATOMIC_READ:
+ atomic_rmw_count++;
+ break;
+ case ATOMIC_FENCE:
+ atomic_fence_count++;
+ break;
+ case ATOMIC_LOCK:
+ atomic_lock_count++;
+ break;
+ case ATOMIC_TRYLOCK:
+ atomic_trylock_count++;
+ break;
+ case ATOMIC_UNLOCK:
+ atomic_unlock_count++;
+ break;
+ case ATOMIC_NOTIFY_ONE:
+ case ATOMIC_NOTIFY_ALL:
+ atomic_notify_count++;
+ break;
+ case ATOMIC_WAIT:
+ atomic_wait_count++;
+ break;
+ case ATOMIC_TIMEDWAIT:
+ atomic_timedwait_count++;
+ default:
+ return;
}
}
/* remove old wait action and disable this thread */
simple_action_list_t * waiters = get_safe_ptr_action(&condvar_waiters_map, curr->get_location());
- for (sllnode<ModelAction *> * it = waiters->begin(); it != NULL; it = it->getNext()) {
+ for (sllnode<ModelAction *> * it = waiters->begin();it != NULL;it = it->getNext()) {
ModelAction * wait = it->getVal();
if (wait->get_tid() == curr->get_tid()) {
waiters->erase(it);
//operation that isn't release
if (rf->get_last_fence_release()) {
if (vec == NULL)
- vec = rf->get_last_fence_release()->get_cv();
+ vec = new ClockVector(rf->get_last_fence_release()->get_cv(), NULL);
else
(vec=new ClockVector(vec, NULL))->merge(rf->get_last_fence_release()->get_cv());
}