コード例 #1
0
ファイル: dtrace_isa.c プロジェクト: 0xffea/xnu
/*
 * dtrace_xcall() is not called from probe context.
 */
void
dtrace_xcall(processorid_t cpu, dtrace_xcall_t f, void *arg)
{
	xcArg_t xcArg;
	
	xcArg.cpu = cpu;
	xcArg.f = f;
	xcArg.arg = arg;

	mp_broadcast( xcRemote, (void *)&xcArg);
}
コード例 #2
0
ファイル: ucode.c プロジェクト: JackieXie168/xnu
/* Farm an update out to all CPUs */
static void
xcpu_update(void)
{
	if (register_locks() != KERN_SUCCESS)
		return;

	/* Get all CPUs to perform the update */
	mp_broadcast(cpu_update, NULL);

	/* Update the cpuid info */
	cpuid_set_info();

}
コード例 #3
0
ファイル: mp_bench.c プロジェクト: alessandrotnt/patmos
int broadcast_slave(int cnt, int bytes)
{
  int i;

  for (i=0; i<cnt; i++) {
    if (flush & FLUSH_BETWEEN_ITERATIONS) {
      inval_dcache();
      inval_mcache();
    }
    mp_broadcast(&comm_world, 1);
  }
  return 0;

}
コード例 #4
0
ファイル: mp_bench.c プロジェクト: alessandrotnt/patmos
int broadcast_master(int cnt, int bytes)
{
  int i;
  unsigned long long total = 0;

  TIMER_START;
  for (i=0; i<cnt; i++) {
    if (flush & FLUSH_BETWEEN_ITERATIONS) {
      inval_dcache();
      inval_mcache();
    }
    mp_broadcast(&comm_world, 1);
  }
  TIMER_STOP;
  total = TIMER_ELAPSED;
  total -= calibrate_cache_flush(cnt);
  return(((unsigned long long)cnt*bytes*1000000)/(total*1024.0)); /* KB/sec */
}