| 83 | } |
| 84 | |
| 85 | void smileCondWait(smileCond &cond) |
| 86 | { |
| 87 | pthread_mutex_lock(&cond.mtx); |
| 88 | while (!cond.signaled) { |
| 89 | pthread_cond_wait(&cond.cond, &cond.mtx); |
| 90 | } |
| 91 | cond.signaled = 0; |
| 92 | pthread_mutex_unlock(&cond.mtx); |
| 93 | } |
| 94 | |
| 95 | void smileCondWaitWMtx(smileCond &cond, smileMutex &mtx) |
| 96 | { |