+#ifdef USE_SIMPLE_SIGNALS
+/* if we can't pass a (function, arg) pair through a signal properly,
+ * we do it the simple way. When a timer fires, we increment a counter
+ * in the time trigger and broadcast a generic signal to all cores. Cores
+ * search the time trigger list for any triggers for which their last seen
+ * firing counter is lower than the current one.
+ */
+void
+kperf_signal_handler(void)
+{
+ int i, cpu;
+ struct time_trigger *tr = NULL;
+
+ OSMemoryBarrier();
+
+ cpu = chudxnu_cpu_number();
+ for( i = 0; i < (int) timerc; i++ )
+ {
+ tr = &timerv[i];
+ if( tr->fire_count <= tr->last_cpu_fire[cpu] )
+ continue; /* this trigger hasn't fired */
+
+ /* fire the trigger! */
+ tr->last_cpu_fire[cpu] = tr->fire_count;
+ kperf_ipi_handler( tr );
+ }
+}
+#else
+void
+kperf_signal_handler(void)
+{
+ // so we can link...
+}
+#endif
+