X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=cdschecker_modified_benchmarks%2Fspsc-queue%2Fspsc-relacy.cc;fp=cdschecker_modified_benchmarks%2Fspsc-queue%2Fspsc-relacy.cc;h=37ed989c46b85200a90b900c914939123af93577;hb=cfa242fc641a6f27e60980e06b3ea8afea9189c4;hp=0000000000000000000000000000000000000000;hpb=933ce4328bcaa98851474a5c2e2f29ab48a07322;p=c11concurrency-benchmarks.git diff --git a/cdschecker_modified_benchmarks/spsc-queue/spsc-relacy.cc b/cdschecker_modified_benchmarks/spsc-queue/spsc-relacy.cc new file mode 100644 index 0000000..37ed989 --- /dev/null +++ b/cdschecker_modified_benchmarks/spsc-queue/spsc-relacy.cc @@ -0,0 +1,27 @@ +#include + +#include "queue-relacy.h" + +struct spsc_queue_test : rl::test_suite +{ + spsc_queue q; + + void thread(unsigned thread_index) + { + if (0 == thread_index) + { + q.enqueue(11); + } + else + { + int d = q.dequeue(); + RL_ASSERT(11 == d); + } + } +}; + + +int main() +{ + rl::simulate(); +}