-/* $OpenBSD: ipifuncs.c,v 1.16 2017/05/28 15:46:06 visa Exp $ */
+/* $OpenBSD: ipifuncs.c,v 1.17 2017/05/28 17:12:48 visa Exp $ */
/* $NetBSD: ipifuncs.c,v 1.40 2008/04/28 20:23:10 martin Exp $ */
/*-
;
/* action function */
- if (local_action_func != NULL)
- local_action_func(local_func_arg);
+ (*local_action_func)(local_func_arg);
/* spin on exit rendezvous */
atomic_setbits_int(&smp_rv_waiters[1], cpumask);
unsigned int cpumask = 1 << cpu_number();
if (cpumask == map) {
- if (action_func != NULL)
- action_func(arg);
+ (*action_func)(arg);
return;
}
smp_rendezvous_action();
while (smp_rv_waiters[1] != smp_rv_map)
- ;
+ continue;
+
+ smp_rv_action_func = NULL;
+
/* release lock */
mtx_leave(&smp_ipi_mtx);
}