Lines Matching refs:lock
313 result = rt_mutex_init(&(mutex->lock), name, RT_IPC_FLAG_PRIO); in pthread_mutex_init()
318 rt_object_detach(&(mutex->lock.parent.parent)); in pthread_mutex_init()
319 mutex->lock.parent.parent.type = RT_Object_Class_Mutex; in pthread_mutex_init()
356 if (mutex->lock.owner != RT_NULL) in pthread_mutex_destroy()
410 if (mutex->lock.owner == rt_thread_self() && in pthread_mutex_lock()
419 result = rt_mutex_take(&(mutex->lock), RT_WAITING_FOREVER); in pthread_mutex_lock()
466 if (mutex->lock.owner != rt_thread_self()) in pthread_mutex_unlock()
476 if (mutex->lock.owner == RT_NULL) in pthread_mutex_unlock()
480 result = rt_mutex_release(&(mutex->lock)); in pthread_mutex_unlock()
528 if (mutex->lock.owner == rt_thread_self() && in pthread_mutex_trylock()
537 result = rt_mutex_take(&(mutex->lock), 0); in pthread_mutex_trylock()