Lines Matching refs:p
63 struct proc *p; in sys_profil() local
68 p = td->td_proc; in sys_profil()
70 PROC_LOCK(p); in sys_profil()
71 stopprofclock(p); in sys_profil()
72 PROC_UNLOCK(p); in sys_profil()
75 PROC_LOCK(p); in sys_profil()
77 PROC_PROFLOCK(p); in sys_profil()
82 PROC_PROFUNLOCK(p); in sys_profil()
83 startprofclock(p); in sys_profil()
84 PROC_UNLOCK(p); in sys_profil()
138 struct proc *p = td->td_proc; in addupc_task() local
148 PROC_LOCK(p); in addupc_task()
149 if (!(p->p_flag & P_PROFIL)) { in addupc_task()
150 PROC_UNLOCK(p); in addupc_task()
153 p->p_profthreads++; in addupc_task()
154 prof = &p->p_stats->p_prof; in addupc_task()
155 PROC_PROFLOCK(p); in addupc_task()
158 PROC_PROFUNLOCK(p); in addupc_task()
163 PROC_PROFUNLOCK(p); in addupc_task()
164 PROC_UNLOCK(p); in addupc_task()
168 PROC_LOCK(p); in addupc_task()
173 PROC_LOCK(p); in addupc_task()
176 if (--p->p_profthreads == 0) { in addupc_task()
177 if (p->p_flag & P_STOPPROF) { in addupc_task()
178 wakeup(&p->p_profthreads); in addupc_task()
179 p->p_flag &= ~P_STOPPROF; in addupc_task()
184 stopprofclock(p); in addupc_task()
185 PROC_UNLOCK(p); in addupc_task()