| 51 | } |
| 52 | |
| 53 | void ThreadLock::unlock() { |
| 54 | auto ret = pthread_mutex_unlock(&m_lock); |
| 55 | if (ret != 0) { |
| 56 | MMKVError("fail to unlock %p, ret=%d, errno=%s", &m_lock, ret, strerror(errno)); |
| 57 | } |
| 58 | } |
| 59 | |
| 60 | bool ThreadLock::try_lock() { |
| 61 | auto ret = pthread_mutex_trylock(&m_lock); |
nothing calls this directly
no outgoing calls
no test coverage detected