sem_t GC_suspend_ack_sem;
+void GC_suspend_handler_inner(ptr_t sig_arg);
+
+#if defined(IA64) || defined(HP_PA)
+extern void GC_with_callee_saves_pushed();
+
void GC_suspend_handler(int sig)
{
+ GC_with_callee_saves_pushed(GC_suspend_handler_inner, (ptr_t)(word)sig);
+}
+
+#else
+/* We believe that in all other cases the full context is already */
+/* in the signal handler frame. */
+void GC_suspend_handler(int sig)
+{
+ GC_suspend_handler_inner((ptr_t)(word)sig);
+}
+#endif
+
+void GC_suspend_handler_inner(ptr_t sig_arg)
+{
+ int sig = (int)(word)sig_arg;
int dummy;
pthread_t my_thread = pthread_self();
GC_thread me;
}
}
for (i = 0; i < n_live_threads; i++) {
- if (0 != (code = sem_wait(&GC_suspend_ack_sem))) {
+ while (0 != (code = sem_wait(&GC_suspend_ack_sem))) {
+ if (errno != EINTR) {
GC_err_printf1("Sem_wait returned %ld\n", (unsigned long)code);
ABORT("sem_wait for handler failed");
+ }
}
}
# ifdef PARALLEL_MARK