for mcs-lock
authorPeizhao Ou <peizhaoo@uci.edu>
Fri, 21 Mar 2014 21:19:44 +0000 (14:19 -0700)
committerPeizhao Ou <peizhaoo@uci.edu>
Fri, 21 Mar 2014 21:19:44 +0000 (14:19 -0700)
benchmark/mcs-lock/mcs-lock.h

index 27db46981f3d165823ce3a3372cc6ecc1a7e0e96..af31894cfeaf626c0717be79c5429eb910c624ac 100644 (file)
@@ -82,8 +82,8 @@ public:
                me->gate.store(1, std::mo_relaxed );
 
                // publish my node as the new tail :
-               mcs_node * pred = m_tail.exchange(me, std::mo_acq_rel);
                // FIXME: Only weakening the mo_acq_rel cause the spec error
+               mcs_node * pred = m_tail.exchange(me, std::mo_acq_rel);
                /**
                        @Begin
                        @Commit_point_define_check: pred == NULL
@@ -135,9 +135,9 @@ public:
                {
                        mcs_node * tail_was_me = me;
                        bool success;
+                       // FIXME: Only weakening the mo_acq_rel cause the spec error
                        success = m_tail.compare_exchange_strong(
                                tail_was_me,NULL,std::mo_acq_rel);
-                       // FIXME: Only weakening the mo_acq_rel cause the spec error
                        /**
                                @Begin
                                @Commit_point_define_check: success == true