Even though I was doing rudimentary loading and storing of atomic values, I
didn't properly record the value in the ModelAction. That will be confusing
soon if I don't fix it. So fix it.
int atomic_load_explicit(struct atomic_object *obj, memory_order order)
{
+ int value = obj->value;
DBG();
- model->switch_to_master(new ModelAction(ATOMIC_READ, order, obj, VALUE_NONE));
- return obj->value;
+ model->switch_to_master(new ModelAction(ATOMIC_READ, order, obj, value));
+ return value;
}
void atomic_init(struct atomic_object *obj, int value)