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

Function lock_profile_thread_exit

freebsd/kern/subr_lock.c:639–662  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

637}
638
639void
640lock_profile_thread_exit(struct thread *td)
641{
642#ifdef INVARIANTS
643 struct lock_profile_object *l;
644
645 MPASS(curthread->td_critnest == 0);
646#endif
647 /*
648 * If lock profiling was disabled we have to wait for reset to
649 * clear our pointers before we can exit safely.
650 */
651 lock_prof_reset_wait();
652#ifdef INVARIANTS
653 LIST_FOREACH(l, &td->td_lprof[0], lpo_link)
654 printf("thread still holds lock acquired at %s:%d\n",
655 l->lpo_file, l->lpo_line);
656 LIST_FOREACH(l, &td->td_lprof[1], lpo_link)
657 printf("thread still holds lock acquired at %s:%d\n",
658 l->lpo_file, l->lpo_line);
659#endif
660 MPASS(LIST_FIRST(&td->td_lprof[0]) == NULL);
661 MPASS(LIST_FIRST(&td->td_lprof[1]) == NULL);
662}
663
664void
665lock_profile_release_lock(struct lock_object *lo)

Callers 2

thread_free_batchedFunction · 0.85
thread_waitFunction · 0.85

Calls 2

lock_prof_reset_waitFunction · 0.85
printfFunction · 0.70

Tested by

no test coverage detected