X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=seqlock%2Fseqlock-wildcard.h;h=c7d0634e3b5a763fd234f5963f29beba7500f914;hb=b684f62b7411fea476b2e1f6a8bbf920ac4c7216;hp=85686eaf9ebe60af0e3e1c4ae26bddfda4370aaa;hpb=280528092c1e033b6283f6c3ec30260c7c169cce;p=model-checker-benchmarks.git diff --git a/seqlock/seqlock-wildcard.h b/seqlock/seqlock-wildcard.h index 85686ea..c7d0634 100644 --- a/seqlock/seqlock-wildcard.h +++ b/seqlock/seqlock-wildcard.h @@ -28,14 +28,13 @@ typedef struct seqlock { void write(int new_data) { while (true) { - // This might be a relaxed too int old_seq = _seq.load(wildcard(4)); // acquire if (old_seq % 2 == 1) continue; // Retry // Should be relaxed!!! if (_seq.compare_exchange_strong(old_seq, old_seq + 1, - wildcard(5), wildcard(6))) // relaxed + wildcard(5), wildcard(6))) // relaxed break; }