| 65 | static butil::atomic<bool> stop (false); |
| 66 | |
| 67 | static void *odd_thread(void *) { |
| 68 | nbthreads.fetch_add(1); |
| 69 | while (!stop) { |
| 70 | if (!counted) { |
| 71 | counted = true; |
| 72 | npthreads.fetch_add(1); |
| 73 | } |
| 74 | bthread::butex_wake_all(even); |
| 75 | bthread::butex_wait(odd, 0, NULL); |
| 76 | } |
| 77 | return NULL; |
| 78 | } |
| 79 | |
| 80 | static void *even_thread(void *) { |
| 81 | nbthreads.fetch_add(1); |
nothing calls this directly
no test coverage detected