FreeBSD/lib/libkvm/kvm_pcpu.c
/*
 * Check whether the value is within the dpcpu symbol range and only if so
 * adjust the offset relative to the current offset.
 */
Check whether the value is within the dpcpu symbol range and only if so
adjust the offset relative to the current offset.
Check whether the value is within the dpcpu symbol range and only if so adjust the offset relative to the current offset .
kvaddr_t
_kvm_dpcpu_validaddr(kvm_t *kd, kvaddr_t value)
{
	if (value == 0)
		return (value);
	if (!kd->dpcpu_initialized)
		return (value);
	if (value < kd->dpcpu_start || value >= kd->dpcpu_stop)
		return (value);
	return (kd->dpcpu_curoff + value);
}
kvaddr_t _kvm_dpcpu_validaddr ( kvm_t * kd , kvaddr_t value ) { if ( value == 0 ) return ( value ) ; if ( ! kd -> dpcpu_initialized ) return ( value ) ; if ( value < kd -> dpcpu_start || value >= kd -> dpcpu_stop ) return ( value ) ; return ( kd -> dpcpu_curoff + value ) ; }
Check whether the value is within the dpcpu symbol range and only if so
 adjust the offset relative to the current offset.
Check whether the value is within the dpcpu symbol range and only if so adjust the offset relative to the current offset .