| 240 | } |
| 241 | |
| 242 | void thread(unsigned int tid) |
| 243 | { |
| 244 | RelacyThreadExitNotifier::notify_relacy_thread_start(); |
| 245 | |
| 246 | if (tid == 0) { |
| 247 | ProducerToken t(q); |
| 248 | for (int i = 0; i != 12; ++i) { |
| 249 | q.enqueue(t, i); |
| 250 | } |
| 251 | } |
| 252 | else { |
| 253 | int item; |
| 254 | ConsumerToken t(q); |
| 255 | for (int i = 0; i != 3; ++i) { |
| 256 | if (q.try_dequeue(t, item)) { |
| 257 | RL_ASSERT(!seen[item]); |
| 258 | seen[item] = true; |
| 259 | } |
| 260 | } |
| 261 | } |
| 262 | |
| 263 | RelacyThreadExitNotifier::notify_relacy_thread_exit(); |
| 264 | } |
| 265 | |
| 266 | void after() |
| 267 | { |
nothing calls this directly
no test coverage detected