Lines Matching refs:tun_lock
179 mutex_enter(&tp->tun_lock); in tun_find_unit()
212 mutex_init(&tp->tun_lock, MUTEX_DEFAULT, IPL_SOFTNET); in tun_init()
230 mutex_destroy(&tp->tun_lock); in tun_fini()
316 mutex_enter(&tp->tun_lock); in tun_clone_destroy()
330 mutex_exit(&tp->tun_lock); in tun_clone_destroy()
369 mutex_exit(&tp->tun_lock); in tunopen()
378 mutex_exit(&tp->tun_lock); in tunopen()
411 mutex_exit(&tp->tun_lock); in tunclose()
450 mutex_enter(&tp->tun_lock); in tun_enable()
491 mutex_exit(&tp->tun_lock); in tun_enable()
564 mutex_enter(&tp->tun_lock); in tun_output()
571 mutex_exit(&tp->tun_lock); in tun_output()
575 mutex_exit(&tp->tun_lock); in tun_output()
644 mutex_enter(&tp->tun_lock); in tun_output()
649 mutex_exit(&tp->tun_lock); in tun_output()
776 mutex_exit(&tp->tun_lock); in tunioctl()
816 if (cv_wait_sig(&tp->tun_cv, &tp->tun_lock)) { in tunread()
823 mutex_exit(&tp->tun_lock); in tunread()
843 mutex_exit(&tp->tun_lock); in tunread()
869 mutex_exit(&tp->tun_lock); in tunwrite()
974 mutex_enter(&tp->tun_lock); in tunwrite()
984 mutex_exit(&tp->tun_lock); in tunwrite()
992 mutex_exit(&tp->tun_lock); in tunwrite()
1012 mutex_enter(&tp->tun_lock); in tunstart()
1020 mutex_exit(&tp->tun_lock); in tunstart()
1058 mutex_exit(&tp->tun_lock); in tunpoll()
1068 mutex_enter(&tp->tun_lock); in filt_tunrdetach()
1070 mutex_exit(&tp->tun_lock); in filt_tunrdetach()
1082 KASSERT(mutex_owned(&tp->tun_lock)); in filt_tunread()
1084 mutex_enter(&tp->tun_lock); in filt_tunread()
1092 KASSERT(mutex_owned(&tp->tun_lock)); in filt_tunread()
1094 mutex_exit(&tp->tun_lock); in filt_tunread()
1133 mutex_exit(&tp->tun_lock); in tunkqfilter()