| 37 | } |
| 38 | |
| 39 | int user_main(int, char**) |
| 40 | { |
| 41 | init(); |
| 42 | |
| 43 | // Start out as thread IDs, but are re-used by the threads |
| 44 | // to indicate the number of elements each one dequeued |
| 45 | int w = 1, x = 2, y = 3, z = 4; |
| 46 | |
| 47 | thrd_t a, b, c, d; |
| 48 | |
| 49 | thrd_create(&a, &producer, &w); |
| 50 | thrd_create(&b, &consumer, &x); |
| 51 | thrd_create(&c, &consumer, &y); |
| 52 | thrd_create(&d, &consumer, &z); |
| 53 | |
| 54 | thrd_join(a); |
| 55 | thrd_join(b); |
| 56 | thrd_join(c); |
| 57 | thrd_join(d); |
| 58 | |
| 59 | MODEL_ASSERT(w + x + y + z + size_approx() == 8); |
| 60 | |
| 61 | return 0; |
| 62 | } |
nothing calls this directly
no test coverage detected