Lines Matching refs:ret
113 int ret = EINVAL; in acquire_mutex() local
121 ret = EINVAL; in acquire_mutex()
127 ret = 0; in acquire_mutex()
134 if (ret != 0) { in acquire_mutex()
143 ret = EBUSY; in acquire_mutex()
156 ret = EAGAIN; in acquire_mutex()
161 ret = EDEADLK; in acquire_mutex()
165 ret = EINVAL; in acquire_mutex()
170 if (ret == 0) { in acquire_mutex()
171 ret = k_mutex_lock(m, timeout); in acquire_mutex()
172 if (ret == -EAGAIN) { in acquire_mutex()
178 ret = ETIMEDOUT; in acquire_mutex()
183 if (ret < 0) { in acquire_mutex()
184 LOG_DBG("k_mutex_unlock() failed: %d", ret); in acquire_mutex()
185 ret = -ret; in acquire_mutex()
188 if (ret == 0) { in acquire_mutex()
192 return ret; in acquire_mutex()
270 int ret; in pthread_mutex_unlock() local
278 ret = k_mutex_unlock(m); in pthread_mutex_unlock()
279 if (ret < 0) { in pthread_mutex_unlock()
280 LOG_DBG("k_mutex_unlock() failed: %d", ret); in pthread_mutex_unlock()
281 return -ret; in pthread_mutex_unlock()
284 __ASSERT_NO_MSG(ret == 0); in pthread_mutex_unlock()