| 434 | } |
| 435 | |
| 436 | int Wait() { |
| 437 | int ret = 0; |
| 438 | bthread_mutex_lock(&_mutex); |
| 439 | while (_count > 0) { |
| 440 | ret = bthread_cond_wait(&_cond, &_mutex); |
| 441 | } |
| 442 | bthread_mutex_unlock(&_mutex); |
| 443 | return ret; |
| 444 | } |
| 445 | private: |
| 446 | int _count; |
| 447 | bthread_cond_t _cond; |
no test coverage detected