X-Git-Url: http://plrg.eecs.uci.edu/git/?p=c11concurrency-benchmarks.git;a=blobdiff_plain;f=iris%2Fsrc%2Fbase_logger.cpp;h=1357a9a8afa6c4a953ec745125b290fc52669eda;hp=a1a43ca2e3a13abf9d2331b9963fbf24740022a3;hb=80b9bd33985bec36b89fca167c7bc87e7e4e8995;hpb=1491fc3840762ae57661f247ae363be83e0132a2 diff --git a/iris/src/base_logger.cpp b/iris/src/base_logger.cpp index a1a43ca..1357a9a 100644 --- a/iris/src/base_logger.cpp +++ b/iris/src/base_logger.cpp @@ -30,7 +30,9 @@ thread_logqueue::thread_logqueue(thread_logqueue *head, size_t queue_size, size_ p = head->next.load(std::memory_order_acquire); this->next.store(p, std::memory_order_release); // head might have been modified or deleted cas until this is inserted - if (head->next.compare_exchange_weak(p, this, std::memory_order_release)) { + // Use seq_cst ordering is a temporary fix. C11tester did not implement pipe (used in notifier.cpp) so that + // writing to/reading from a pipe establish a happens-before relation + if (head->next.compare_exchange_weak(p, this, std::memory_order_seq_cst /*std::memory_order_release*/)) { return; } } while (true);