FreeBSD/sys/dev/hwpmc/hwpmc_amd.c
/*
 * Machine dependent actions taken during the context switch out of a
 * thread.
 */
Machine dependent actions taken during the context switch out of a
thread.
Machine dependent actions taken during the context switch out of a thread .
static int
amd_switch_out(struct pmc_cpu *pc, struct pmc_process *pp)
{
	(void) pc;
	(void) pp;		
	PMCDBG3(MDP,SWO,1, "pc=%p pp=%p enable-msr=%d", pc, pp, pp ?
	    (pp->pp_flags & PMC_PP_ENABLE_MSR_ACCESS) == 1 : 0);
	load_cr4(rcr4() & ~CR4_PCE);
	return 0;
}
static int amd_switch_out ( struct pmc_cpu * pc , struct pmc_process * pp ) { ( void ) pc ; ( void ) pp ; PMCDBG3 ( MDP , SWO , 1 , " " , pc , pp , pp ? ( pp -> pp_flags & PMC_PP_ENABLE_MSR_ACCESS ) == 1 : 0 ) ; load_cr4 ( rcr4 ( ) & ~ CR4_PCE ) ; return 0 ; }
Machine dependent actions taken during the context switch out of a
 thread.
Machine dependent actions taken during the context switch out of a thread .
/* can be NULL */ /* always turn off the RDPMC instruction */