MCPcopy Create free account
hub / github.com/F-Stack/f-stack / thread_lock_validate

Function thread_lock_validate

freebsd/kern/kern_mutex.c:801–815  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

799
800#ifdef INVARIANTS
801static void
802thread_lock_validate(struct mtx *m, int opts, const char *file, int line)
803{
804
805 KASSERT(m->mtx_lock != MTX_DESTROYED,
806 ("thread_lock() of destroyed mutex @ %s:%d", file, line));
807 KASSERT(LOCK_CLASS(&m->lock_object) == &lock_class_mtx_spin,
808 ("thread_lock() of sleep mutex %s @ %s:%d",
809 m->lock_object.lo_name, file, line));
810 KASSERT((m->lock_object.lo_flags & LO_RECURSABLE) == 0,
811 ("thread_lock: got a recursive mutex %s @ %s:%d\n",
812 m->lock_object.lo_name, file, line));
813 WITNESS_CHECKORDER(&m->lock_object,
814 opts | LOP_NEWORDER | LOP_EXCLUSIVE, file, line, NULL);
815}
816#else
817#define thread_lock_validate(m, opts, file, line) do { } while (0)
818#endif

Callers 2

_thread_lockFunction · 0.85
thread_lock_flags_Function · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected