Home
last modified time | relevance | path

Searched refs:mutex_is_locked (Results 1 – 4 of 4) sorted by relevance

/DragonOS-0.1.5/kernel/src/ktest/
Dtest-mutex.c18 assert(mutex_is_locked(&mtx) == 0); in ktest_mutex_case0()
20 assert(mutex_is_locked(&mtx) == 1); in ktest_mutex_case0()
22 assert(mutex_is_locked(&mtx) == 0); in ktest_mutex_case0()
25 assert(mutex_is_locked(&mtx) == 0); in ktest_mutex_case0()
37 assert(mutex_is_locked(&mtx) == 1); in ktest_mutex_case1_pid1()
49 if (!assert(mutex_is_locked(&mtx) == 0)) in ktest_mutex_case1()
/DragonOS-0.1.5/kernel/src/libs/
Dmutex.c39 if (likely(mutex_is_locked(lock))) in mutex_lock()
73 if (unlikely(!mutex_is_locked(lock))) in mutex_unlock()
78 if (mutex_is_locked(lock)) in mutex_unlock()
106 if (mutex_is_locked(lock)) in mutex_trylock()
110 if (mutex_is_locked(lock)) in mutex_trylock()
/DragonOS-0.1.5/kernel/src/common/
Dmutex.h69 #define mutex_is_locked(lock) ((atomic_read(&(lock)->count) == 1) ? 0 : 1) macro
/DragonOS-0.1.5/docs/kernel/locking/
Dmutex.md167 #### mutex_is_locked subsubsection
169 **`void mutex_is_locked(mutex_t *lock)`**