| 96 | } |
| 97 | |
| 98 | void push(T obj) { |
| 99 | sem_wait(&_semmax); |
| 100 | pthread_mutex_lock(&_mutex); |
| 101 | _q.push_back(obj); |
| 102 | pthread_mutex_unlock(&_mutex); |
| 103 | sem_post(&_semcnt); |
| 104 | } |
| 105 | |
| 106 | T pop() { |
| 107 | sem_wait(&_semcnt); |
no outgoing calls
no test coverage detected