returns true if mutex is busy
| 205 | |
| 206 | // returns true if mutex is busy |
| 207 | int MUTEX_CHECK(pthread_mutex_t *m) |
| 208 | { |
| 209 | int trylock = pthread_mutex_trylock(m); |
| 210 | |
| 211 | if (trylock != EBUSY) |
| 212 | { |
| 213 | pthread_mutex_unlock(m); |
| 214 | } |
| 215 | |
| 216 | return trylock == EBUSY; |
| 217 | } |
| 218 | |
| 219 | |
| 220 | /* |
no test coverage detected