| 92 | } |
| 93 | |
| 94 | bool FileLock::fcntlUnLock(bool unlockToSharedLock) { |
| 95 | m_lockInfo.l_type = static_cast<short>(unlockToSharedLock ? F_RDLCK : F_UNLCK); |
| 96 | auto FcntlLockOp = m_isAshmem ? F_SETLK : F_OFD_SETLK; |
| 97 | auto ret = fcntl(m_fd, FcntlLockOp, &m_lockInfo); |
| 98 | if (ret != 0) { |
| 99 | MMKVError("fail to unlock fd=%d, ret=%d, error:%s", m_fd, ret, strerror(errno)); |
| 100 | return false; |
| 101 | } else { |
| 102 | return true; |
| 103 | } |
| 104 | } |
| 105 | |
| 106 | } // namespace mmkv |
| 107 |
nothing calls this directly
no outgoing calls
no test coverage detected