// incRefWithParent grabs a reference.
//
// This function is called when this ProcessGroup is being associated with some
// new ThreadGroup, tg. parentPG is the ProcessGroup of tg's parent
// ThreadGroup. If tg is init, then parentPG may be nil.
//
// Precondition: callers must hold TaskSet.mu for writing.
incRefWithParent grabs a reference.

This function is called when this ProcessGroup is being associated with some
new ThreadGroup, tg. parentPG is the ProcessGroup of tg's parent
ThreadGroup. If tg is init, then parentPG may be nil.

callers must hold TaskSet.mu for writing.
// incRefWithParent grabs a reference . // // This function is called when this ProcessGroup is being associated with some // new ThreadGroup tg . parentPG is the ProcessGroup of tg ' s parent // ThreadGroup . If tg is init then parentPG may be nil . // // Precondition : callers must hold TaskSet . mu for writing .
func (pg *ProcessGroup) incRefWithParent(parentPG *ProcessGroup) {
	if pg != parentPG && (parentPG == nil || pg.session == parentPG.session) {
		pg.ancestors++
	}
	pg.refs.IncRef()
}
func ( pg * ProcessGroup ) incRefWithParent ( parentPG * ProcessGroup ) { if pg != parentPG && ( parentPG == nil || pg . session == parentPG . session ) { pg . ancestors ++ } pg . refs . IncRef ( ) }
incRefWithParent grabs a reference.
incRefWithParent grabs a reference .
// We acquire an "ancestor" reference in the case of a nil parent. // This is because the process being associated is init, and init can // never be orphaned (we count it as always having an ancestor).