projects
/
model-checker-benchmarks.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
spsc-queue: add new benchmark
[model-checker-benchmarks.git]
/
spsc-queue
/
spsc-queue.cc
1
#include "queue.h"
2
3
struct spsc_queue_test : rl::test_suite<spsc_queue_test, 2>
4
{
5
spsc_queue<int> q;
6
7
void thread(unsigned thread_index)
8
{
9
if (0 == thread_index)
10
{
11
q.enqueue(11);
12
}
13
else
14
{
15
int d = q.dequeue();
16
RL_ASSERT(11 == d);
17
}
18
}
19
};
20
21
int main()
22
{
23
rl::simulate<spsc_queue_test>();
24
}