| 78 | } |
| 79 | |
| 80 | static void *even_thread(void *) { |
| 81 | nbthreads.fetch_add(1); |
| 82 | while (!stop) { |
| 83 | if (!counted) { |
| 84 | counted = true; |
| 85 | npthreads.fetch_add(1); |
| 86 | } |
| 87 | bthread::butex_wake_all(odd); |
| 88 | bthread::butex_wait(even, 0, NULL); |
| 89 | } |
| 90 | return NULL; |
| 91 | } |
| 92 | |
| 93 | TEST(BthreadTest, setconcurrency_with_running_bthread) { |
| 94 | odd = bthread::butex_create_checked<butil::atomic<int> >(); |
nothing calls this directly
no test coverage detected