patches that old versions of the benchmarks (mcs-lock, rcu & seqlock) used
authorPeizhao Ou <peizhaoo@uci.edu>
Wed, 7 Dec 2016 21:26:56 +0000 (13:26 -0800)
committerPeizhao Ou <peizhaoo@uci.edu>
Wed, 7 Dec 2016 21:26:56 +0000 (13:26 -0800)
mcs-lock/mcs-lock.cc.patch [new file with mode: 0644]
read-copy-update/rcu.cc.patch [new file with mode: 0644]
read-copy-update/rcu.h.patch [new file with mode: 0644]
seqlock/seqlock.cc.patch [new file with mode: 0644]

diff --git a/mcs-lock/mcs-lock.cc.patch b/mcs-lock/mcs-lock.cc.patch
new file mode 100644 (file)
index 0000000..14ecec9
--- /dev/null
@@ -0,0 +1,4 @@
+81c81
+<                      tail_was_me,NULL,std::mo_release) ) {
+---
+>                      tail_was_me,NULL,std::mo_acq_rel) ) {
diff --git a/read-copy-update/rcu.cc.patch b/read-copy-update/rcu.cc.patch
new file mode 100644 (file)
index 0000000..4754c2c
--- /dev/null
@@ -0,0 +1,12 @@
+21,22c21,22
+<      *data1 = res->data1;
+<      *data2 = res->data2;
+---
+>      *data1 = res->data1.load(memory_order_relaxed);
+>      *data2 = res->data2.load(memory_order_relaxed);
+27,28c27,28
+<      newPtr->data1 = prev->data1 + d1;
+<      newPtr->data2 = prev->data2 + d2;
+---
+>      newPtr->data1.store(prev->data1.load(memory_order_relaxed) + d1, memory_order_relaxed);
+>      newPtr->data2.store(prev->data2.load(memory_order_relaxed) + d2, memory_order_relaxed);
diff --git a/read-copy-update/rcu.h.patch b/read-copy-update/rcu.h.patch
new file mode 100644 (file)
index 0000000..c65f3e7
--- /dev/null
@@ -0,0 +1,6 @@
+14,15c14,15
+<      int data1;
+<      int data2;
+---
+>      atomic_int data1;
+>      atomic_int data2;
diff --git a/seqlock/seqlock.cc.patch b/seqlock/seqlock.cc.patch
new file mode 100644 (file)
index 0000000..cad8153
--- /dev/null
@@ -0,0 +1,16 @@
+23c23
+<             thrd_yield();
+---
+>             //thrd_yield();
+38c38
+<             thrd_yield();
+---
+>             //thrd_yield();
+54c54
+<             thrd_yield();
+---
+>             //thrd_yield();
+61c61
+<             thrd_yield();
+---
+>             //thrd_yield();