FreeBSD/sys/dev/filemon/filemon.c
/*
 * Acquire the proc's p_filemon reference and lock the filemon.
 * The proc's p_filemon may not match this filemon on return.
 */
Acquire the proc's p_filemon reference and lock the filemon.
The proc's p_filemon may not match this filemon on return.
Acquire the proc ' s p_filemon reference and lock the filemon . The proc ' s p_filemon may not match this filemon on return .
static struct filemon *
filemon_proc_get(struct proc *p)
{
	struct filemon *filemon;
	if (p->p_filemon == NULL)
		return (NULL);
	PROC_LOCK(p);
	filemon = filemon_acquire(p->p_filemon);
	PROC_UNLOCK(p);
	if (filemon == NULL)
		return (NULL);
	sx_xlock(&filemon->lock);
	return (filemon);
}
static struct filemon * filemon_proc_get ( struct proc * p ) { struct filemon * filemon ; if ( p -> p_filemon == NULL ) return ( NULL ) ; PROC_LOCK ( p ) ; filemon = filemon_acquire ( p -> p_filemon ) ; PROC_UNLOCK ( p ) ; if ( filemon == NULL ) return ( NULL ) ; sx_xlock ( & filemon -> lock ) ; return ( filemon ) ; }
Acquire the proc's p_filemon reference and lock the filemon.
Acquire the proc ' s p_filemon reference and lock the filemon .
/*
	 * The p->p_filemon may have changed by now.  That case is handled
	 * by the exit and fork hooks and filemon_attach_proc specially.
	 */