| 1728 | return waitq_translate_errno(ret); |
| 1729 | } |
| 1730 | int mutex::try_lock() |
| 1731 | { |
| 1732 | thread* ptr = nullptr; |
| 1733 | bool ret = owner.compare_exchange_strong(ptr, CURRENT, |
| 1734 | std::memory_order_acq_rel, std::memory_order_relaxed); |
| 1735 | return (int)ret - 1; |
| 1736 | } |
| 1737 | inline void do_mutex_unlock(mutex* m) |
| 1738 | { |
| 1739 | SCOPED_LOCK(m->splock); |
no outgoing calls
no test coverage detected