me->next.store(NULL, std::mo_relaxed );
me->gate.store(1, std::mo_relaxed );
me->next.store(NULL, std::mo_relaxed );
me->gate.store(1, std::mo_relaxed );
/** 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);
/** 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);
success = m_tail.compare_exchange_strong(
tail_was_me,NULL,std::mo_acq_rel);
/**
success = m_tail.compare_exchange_strong(
tail_was_me,NULL,std::mo_acq_rel);
/**
// (*2) - store to next must be done,
// so no locker can be viewing my node any more
// (*2) - store to next must be done,
// so no locker can be viewing my node any more