edits
[cdsspec-compiler.git] / benchmark / mcs-lock / mcs-lock.h
index bf496318f1107cfb709f25ec04c34cc70da39f24..9f4781246e0e2c0cea2c308e2cbc409f9cc281fb 100644 (file)
@@ -76,6 +76,7 @@ public:
                me->next.store(NULL, std::mo_relaxed );
                me->gate.store(1, std::mo_relaxed );
 
+               /**********  Inadmissible  **********/
                /** Run this in the -Y mode to expose the HB bug */
                // publish my node as the new tail :
                mcs_node * pred = m_tail.exchange(me, std::mo_acq_rel);
@@ -103,6 +104,7 @@ public:
                        rl::linear_backoff bo;
                        int my_gate = 1;
                        while (my_gate ) {
+                               /**********  Inadmissibility  *********/
                                my_gate = me->gate.load(std::mo_acquire);
                                //if (my_gate == 0)
                                        //printf("lock at gate!\n");
@@ -135,6 +137,8 @@ public:
                {
                        mcs_node * tail_was_me = me;
                        bool success;
+
+                       /**********  Inadmissible  **********/
                        success = m_tail.compare_exchange_strong(
                                tail_was_me,NULL,std::mo_acq_rel);
                        /**
@@ -164,6 +168,7 @@ public:
                // (*2) - store to next must be done,
                //  so no locker can be viewing my node any more        
 
+               /**********  Inadmissible  **********/
                // let next guy in :
                next->gate.store( 0, std::mo_release );
                /**