コード例 #1
0
ファイル: ipi.c プロジェクト: ajinkya93/OpenBSD
int
hppa_ipi_broadcast(u_long ipi)
{
	CPU_INFO_ITERATOR cii;
	struct cpu_info *ci;
	int count = 0;

	CPU_INFO_FOREACH(cii, ci)
		if (ci != curcpu() && (ci->ci_flags & CPUF_RUNNING))
			if (hppa_ipi_send(ci, ipi))
				count++;

	return count;	
}
コード例 #2
0
void
xc_send_ipi(struct cpu_info *ci)
{
	
	KASSERT(kpreempt_disabled());
	KASSERT(curcpu() != ci);

	if (ci) {
		/* Unicast: remote CPU. */
		hppa_ipi_send(ci, HPPA_IPI_XCALL);
	} else {
		/* Broadcast: all, but local CPU (caller will handle it). */
		hppa_ipi_broadcast(HPPA_IPI_XCALL);
	}
}