HelenOS sources

futex_assert_is_locked   83 uspace/lib/c/generic/private/futex.h #define futex_assert_is_locked(futex) __futex_assert_is_locked((futex), #futex)
futex_assert_is_locked   93 uspace/lib/c/generic/private/futex.h #define futex_assert_is_locked(fut) assert(atomic_load_explicit(&(fut)->val, memory_order_relaxed) <= 0)
HelenOS homepage, sources at GitHub