Lines Matching refs:mu
54 static struct k_mutex *get_posix_mutex(pthread_mutex_t mu) in get_posix_mutex() argument
57 size_t bit = to_posix_mutex_idx(mu); in get_posix_mutex()
60 if (!is_pthread_obj_initialized(mu)) { in get_posix_mutex()
61 LOG_DBG("Mutex is uninitialized (%x)", mu); in get_posix_mutex()
67 LOG_DBG("Mutex is invalid (%x)", mu); in get_posix_mutex()
73 LOG_DBG("Mutex claims to be initialized (%x)", mu); in get_posix_mutex()
80 struct k_mutex *to_posix_mutex(pthread_mutex_t *mu) in to_posix_mutex() argument
86 if (*mu != PTHREAD_MUTEX_INITIALIZER) { in to_posix_mutex()
87 return get_posix_mutex(*mu); in to_posix_mutex()
97 *mu = mark_pthread_obj_initialized(bit); in to_posix_mutex()
108 static int acquire_mutex(pthread_mutex_t *mu, k_timeout_t timeout) in acquire_mutex() argument
118 m = to_posix_mutex(mu); in acquire_mutex()
222 int pthread_mutex_init(pthread_mutex_t *mu, const pthread_mutexattr_t *_attr) in pthread_mutex_init() argument
228 *mu = PTHREAD_MUTEX_INITIALIZER; in pthread_mutex_init()
230 m = to_posix_mutex(mu); in pthread_mutex_init()
263 int pthread_mutex_unlock(pthread_mutex_t *mu) in pthread_mutex_unlock() argument
268 m = get_posix_mutex(*mu); in pthread_mutex_unlock()
290 int pthread_mutex_destroy(pthread_mutex_t *mu) in pthread_mutex_destroy() argument
296 m = get_posix_mutex(*mu); in pthread_mutex_destroy()
301 bit = to_posix_mutex_idx(*mu); in pthread_mutex_destroy()