From: Brian Demsky Date: Mon, 16 Jul 2012 23:24:53 +0000 (-0700) Subject: no need to store into the object field... this will probably just lead to weird... X-Git-Tag: pldi2013~349 X-Git-Url: http://plrg.eecs.uci.edu/git/?p=model-checker.git;a=commitdiff_plain;h=5b7cd081428d15ff59fbf9252df86dbd1709457f no need to store into the object field... this will probably just lead to weird bugs in the future where people wrongly assume reasonable values in the field... --- diff --git a/libatomic.cc b/libatomic.cc index 4d2ec55..a7b1fd6 100644 --- a/libatomic.cc +++ b/libatomic.cc @@ -5,7 +5,6 @@ void atomic_store_explicit(struct atomic_object *obj, int value, memory_order order) { DBG(); - obj->value = value; model->switch_to_master(new ModelAction(ATOMIC_WRITE, order, obj, value)); } @@ -19,6 +18,5 @@ int atomic_load_explicit(struct atomic_object *obj, memory_order order) void atomic_init(struct atomic_object *obj, int value) { DBG(); - obj->value = value; model->switch_to_master(new ModelAction(ATOMIC_INIT, memory_order_relaxed, obj, value)); }