| 637 | } |
| 638 | |
| 639 | void |
| 640 | lock_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 | |
| 664 | void |
| 665 | lock_profile_release_lock(struct lock_object *lo) |
no test coverage detected