| 641 | } |
| 642 | |
| 643 | void thread(unsigned int tid) |
| 644 | { |
| 645 | RelacyThreadExitNotifier::notify_relacy_thread_start(); |
| 646 | |
| 647 | if (tid == 0) { |
| 648 | for (int i = 0; i != (int)seen.size(); ++i) { |
| 649 | q->enqueue(Foo(i)); |
| 650 | } |
| 651 | } |
| 652 | else { |
| 653 | Foo item; |
| 654 | for (int i = rl::rand(17); i > 0; --i) { |
| 655 | if (q->try_dequeue(item)) { |
| 656 | RL_ASSERT(!seen[item.id]); |
| 657 | seen[item.id] = true; |
| 658 | } |
| 659 | } |
| 660 | } |
| 661 | |
| 662 | RelacyThreadExitNotifier::notify_relacy_thread_exit(); |
| 663 | } |
| 664 | |
| 665 | void after() |
| 666 | { |
nothing calls this directly
no test coverage detected