FreeBSD/sys/fs/nfsclient/nfs_clport.c
/*
 * Find the parent process for the thread passed in as an argument.
 * If none exists, return NULL, otherwise return a thread for the parent.
 * (Can be any of the threads, since it is only used for td->td_proc.)
 */
Find the parent process for the thread passed in as an argument.
If none exists, return NULL, otherwise return a thread for the parent.
(Can be any of the threads, since it is only used for td->td_proc.)
Find the parent process for the thread passed in as an argument . If none exists return NULL otherwise return a thread for the parent . ( Can be any of the threads since it is only used for td - > td_proc . )
NFSPROC_T *
nfscl_getparent(struct thread *td)
{
	struct proc *p;
	struct thread *ptd;
	if (td == NULL)
		return (NULL);
	p = td->td_proc;
	if (p->p_pid == 0)
		return (NULL);
	p = p->p_pptr;
	if (p == NULL)
		return (NULL);
	ptd = TAILQ_FIRST(&p->p_threads);
	return (ptd);
}
NFSPROC_T * nfscl_getparent ( struct thread * td ) { struct proc * p ; struct thread * ptd ; if ( td == NULL ) return ( NULL ) ; p = td -> td_proc ; if ( p -> p_pid == 0 ) return ( NULL ) ; p = p -> p_pptr ; if ( p == NULL ) return ( NULL ) ; ptd = TAILQ_FIRST ( & p -> p_threads ) ; return ( ptd ) ; }
Find the parent process for the thread passed in as an argument.
Find the parent process for the thread passed in as an argument .