#endif
}
+DEFINE_PRIMITIVE ("SMP-WAKE", Prim_smp_wake, 1, 1, "(SMP-WAKE id)\n\
+Send a timer interrupt to processor ID.")
+{
+ PRIMITIVE_HEADER (0);
+
+#ifdef ENABLE_SMP
+ {
+ int id = arg_integer (1);
+ trace (";%d SMP-Wake %d.", self->id, id);
+ processor_t *p;
+ for (p = processors; p != NULL; p = p->next)
+ if (p->id == id)
+ {
+ smp_kill_timer (p->pthread);
+ PRIMITIVE_RETURN (UNSPECIFIC);
+ }
+ outf_error_line (";%d smp-wake: bogus processor id %d", self->id, id);
+ }
+#else
+ signal_error_from_primitive (ERR_UNIMPLEMENTED_PRIMITIVE);
+#endif
+ PRIMITIVE_RETURN (UNSPECIFIC);
+}
+
#ifdef ENABLE_SMP
static SCHEME_OBJECT smp_idle_prim = SHARP_F;
pthread_kill (thread, SIGUSR2);
}
+void
+smp_kill_timer (pthread_t thread)
+{
+ pthread_kill (thread, SIGALRM);
+}
+
#endif /* ENABLE_SMP */
/* The following conditionalization would more naturally be expressed