| 658 | } |
| 659 | |
| 660 | void |
| 661 | __rw_rlock_int(struct rwlock *rw LOCK_FILE_LINE_ARG_DEF) |
| 662 | { |
| 663 | struct thread *td; |
| 664 | uintptr_t v; |
| 665 | |
| 666 | td = curthread; |
| 667 | |
| 668 | KASSERT(kdb_active != 0 || SCHEDULER_STOPPED_TD(td) || |
| 669 | !TD_IS_IDLETHREAD(td), |
| 670 | ("rw_rlock() by idle thread %p on rwlock %s @ %s:%d", |
| 671 | td, rw->lock_object.lo_name, file, line)); |
| 672 | KASSERT(rw->rw_lock != RW_DESTROYED, |
| 673 | ("rw_rlock() of destroyed rwlock @ %s:%d", file, line)); |
| 674 | KASSERT(rw_wowner(rw) != td, |
| 675 | ("rw_rlock: wlock already held for %s @ %s:%d", |
| 676 | rw->lock_object.lo_name, file, line)); |
| 677 | WITNESS_CHECKORDER(&rw->lock_object, LOP_NEWORDER, file, line, NULL); |
| 678 | |
| 679 | v = RW_READ_VALUE(rw); |
| 680 | if (__predict_false(LOCKSTAT_PROFILE_ENABLED(rw__acquire) || |
| 681 | !__rw_rlock_try(rw, td, &v, true LOCK_FILE_LINE_ARG))) |
| 682 | __rw_rlock_hard(rw, td, v LOCK_FILE_LINE_ARG); |
| 683 | else |
| 684 | lock_profile_obtain_lock_success(&rw->lock_object, 0, 0, |
| 685 | file, line); |
| 686 | |
| 687 | LOCK_LOG_LOCK("RLOCK", &rw->lock_object, 0, 0, file, line); |
| 688 | WITNESS_LOCK(&rw->lock_object, 0, file, line); |
| 689 | TD_LOCKS_INC(curthread); |
| 690 | } |
| 691 | |
| 692 | void |
| 693 | __rw_rlock(volatile uintptr_t *c, const char *file, int line) |
nothing calls this directly
no test coverage detected