FreeBSD/sys/dev/hwpmc/hwpmc_mod.c
/*
 * restore the cpu binding of the current thread
 */
restore the cpu binding of the current thread
restore the cpu binding of the current thread
static void
pmc_restore_cpu_binding(struct pmc_binding *pb)
{
	PMCDBG2(CPU,BND,2, "restore-cpu curcpu=%d restore=%d",
	    curthread->td_oncpu, pb->pb_cpu);
	thread_lock(curthread);
	if (pb->pb_bound)
		sched_bind(curthread, pb->pb_cpu);
	else
		sched_unbind(curthread);
	thread_unlock(curthread);
	PMCDBG0(CPU,BND,2, "restore-cpu done");
}
static void pmc_restore_cpu_binding ( struct pmc_binding * pb ) { PMCDBG2 ( CPU , BND , 2 , " " , curthread -> td_oncpu , pb -> pb_cpu ) ; thread_lock ( curthread ) ; if ( pb -> pb_bound ) sched_bind ( curthread , pb -> pb_cpu ) ; else sched_unbind ( curthread ) ; thread_unlock ( curthread ) ; PMCDBG0 ( CPU , BND , 2 , " " ) ; }
restore the cpu binding of the current thread
restore the cpu binding of the current thread