FreeBSD/sys/dev/hwpmc/hwpmc_mod.c
/*
 * save the cpu binding of the current kthread
 */
save the cpu binding of the current kthread
save the cpu binding of the current kthread
static void
pmc_save_cpu_binding(struct pmc_binding *pb)
{
	PMCDBG0(CPU,BND,2, "save-cpu");
	thread_lock(curthread);
	pb->pb_bound = sched_is_bound(curthread);
	pb->pb_cpu   = curthread->td_oncpu;
	thread_unlock(curthread);
	PMCDBG1(CPU,BND,2, "save-cpu cpu=%d", pb->pb_cpu);
}
static void pmc_save_cpu_binding ( struct pmc_binding * pb ) { PMCDBG0 ( CPU , BND , 2 , " " ) ; thread_lock ( curthread ) ; pb -> pb_bound = sched_is_bound ( curthread ) ; pb -> pb_cpu = curthread -> td_oncpu ; thread_unlock ( curthread ) ; PMCDBG1 ( CPU , BND , 2 , " " , pb -> pb_cpu ) ; }
save the cpu binding of the current kthread
save the cpu binding of the current kthread