| 158 | } |
| 159 | |
| 160 | void SignalSafeSemaphore::enter() |
| 161 | { |
| 162 | do { |
| 163 | if (sem_wait(sem) != -1) |
| 164 | return; |
| 165 | } while (errno == EINTR); |
| 166 | system_call_failed::raise("semaphore.h: enter: sem_wait()"); |
| 167 | } |
| 168 | |
| 169 | #ifdef HAVE_SEM_TIMEDWAIT |
| 170 | bool SignalSafeSemaphore::tryEnter(const int seconds, int milliseconds) |
no test coverage detected