projects
/
model-checker-benchmarks.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
bench.sh: run dekker-fences
[model-checker-benchmarks.git]
/
mpmc-queue
/
mpmc-queue.h
diff --git
a/mpmc-queue/mpmc-queue.h
b/mpmc-queue/mpmc-queue.h
index dc2b5618771774238c1c16f97efa87262da182a4..918415fa99278e0a8cc3d47622f84de00749445c 100644
(file)
--- a/
mpmc-queue/mpmc-queue.h
+++ b/
mpmc-queue/mpmc-queue.h
@@
-38,6
+38,8
@@
public:
if ( m_rdwr.compare_exchange_weak(rdwr,rdwr+(1<<16),mo_acq_rel) )
break;
+ else
+ thrd_yield();
}
// (*1)
@@
-69,6
+71,8
@@
public:
if ( m_rdwr.compare_exchange_weak(rdwr,(rd<<16) | ((wr+1)&0xFFFF),mo_acq_rel) )
break;
+ else
+ thrd_yield();
}
// (*1)