| 188 | } |
| 189 | |
| 190 | void thread(unsigned int tid) |
| 191 | { |
| 192 | RelacyThreadExitNotifier::notify_relacy_thread_start(); |
| 193 | |
| 194 | if (tid == 0) { |
| 195 | ProducerToken t(q); |
| 196 | for (int i = 0; i != 8; ++i) { |
| 197 | q.enqueue(t, i); |
| 198 | } |
| 199 | } |
| 200 | else { |
| 201 | int item; |
| 202 | ConsumerToken t(q); |
| 203 | for (int i = 0; i != 6; ++i) { |
| 204 | if (q.try_dequeue(t, item)) { |
| 205 | RL_ASSERT(!seen[item]); |
| 206 | seen[item] = true; |
| 207 | } |
| 208 | } |
| 209 | } |
| 210 | |
| 211 | RelacyThreadExitNotifier::notify_relacy_thread_exit(); |
| 212 | } |
| 213 | |
| 214 | void after() |
| 215 | { |
nothing calls this directly
no test coverage detected