| 1570 | } |
| 1571 | |
| 1572 | static __attribute__((__noinline__)) int mutex_trylock(mutex_t *m) |
| 1573 | { |
| 1574 | if (mutex_disabled) |
| 1575 | return 0; |
| 1576 | pid_t *x = mutex_get_ptr(m); |
| 1577 | pid_t self = mutex_gettid(); |
| 1578 | if (mutex_fast_lock(self, x)) |
| 1579 | return 0; |
| 1580 | else |
| 1581 | { |
| 1582 | errno = EBUSY; |
| 1583 | return -1; |
| 1584 | } |
| 1585 | } |
| 1586 | |
| 1587 | static __attribute__((__noinline__)) int mutex_unlock(mutex_t *m) |
| 1588 | { |
nothing calls this directly
no test coverage detected