X-Git-Url: http://plrg.eecs.uci.edu/git/?p=c11concurrency-benchmarks.git;a=blobdiff_plain;f=cdschecker_modified_benchmarks%2Fspsc-queue%2Fspsc-relacy.cc;fp=cdschecker_modified_benchmarks%2Fspsc-queue%2Fspsc-relacy.cc;h=37ed989c46b85200a90b900c914939123af93577;hp=0000000000000000000000000000000000000000;hb=1491fc3840762ae57661f247ae363be83e0132a2;hpb=6e2a27bd9e36f65acd47ac764bb0373b76c386a3 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(); +}