interrupt_thread_handler);
undoably_install_low_level_interrupt_handler(SIG_STOP_FOR_GC,
sig_stop_for_gc_handler);
-#ifdef SIG_RESUME_FROM_GC
undoably_install_low_level_interrupt_handler(SIG_RESUME_FROM_GC,
- sig_stop_for_gc_handler);
-#endif
+ sig_resume_from_gc_handler);
#endif
SHOW("leaving os_install_interrupt_handlers()");
}
sigaddset(s, SIGPROF);
sigaddset(s, SIGWINCH);
-#if !((defined(LISP_FEATURE_DARWIN) || defined(LISP_FEATURE_FREEBSD)) && defined(LISP_FEATURE_SB_THREAD))
- sigaddset(s, SIGUSR1);
- sigaddset(s, SIGUSR2);
-#endif
-
#ifdef LISP_FEATURE_SB_THREAD
sigaddset(s, SIG_INTERRUPT_THREAD);
#endif
}
void
-sigaddset_blockable(sigset_t *s)
+sigaddset_blockable(sigset_t *sigset)
{
- sigaddset_deferrable(s);
+ sigaddset_deferrable(sigset);
#ifdef LISP_FEATURE_SB_THREAD
-#ifdef SIG_RESUME_FROM_GC
- sigaddset(s, SIG_RESUME_FROM_GC);
-#endif
- sigaddset(s, SIG_STOP_FOR_GC);
+ sigaddset(sigset,SIG_RESUME_FROM_GC);
+ sigaddset(sigset,SIG_STOP_FOR_GC);
#endif
}
FSHOW_SIGNAL((stderr,"suspended\n"));
sigemptyset(&ss);
-#if defined(SIG_RESUME_FROM_GC)
sigaddset(&ss,SIG_RESUME_FROM_GC);
-#else
- sigaddset(&ss,SIG_STOP_FOR_GC);
-#endif
/* It is possible to get SIGCONT (and probably other non-blockable
* signals) here. */
-#ifdef SIG_RESUME_FROM_GC
{
int sigret;
do { sigwait(&ss, &sigret); }
while (sigret != SIG_RESUME_FROM_GC);
}
-#else
- while (sigwaitinfo(&ss,0) != SIG_STOP_FOR_GC);
-#endif
FSHOW_SIGNAL((stderr,"resumed\n"));
if(thread->state!=STATE_RUNNING) {
undo_fake_foreign_function_call(context);
}
+
+void
+sig_resume_from_gc_handler(int signal, siginfo_t *info, void *void_context)
+{
+ lose("SIG_RESUME_FROM_GC handler called.");
+}
+
#endif
void
#ifdef LISP_FEATURE_SB_THREAD
extern void interrupt_thread_handler(int, siginfo_t*, void*);
extern void sig_stop_for_gc_handler(int, siginfo_t*, void*);
+extern void sig_resume_from_gc_handler(int, siginfo_t*, void*);
#endif
typedef void (*interrupt_handler_t)(int, siginfo_t *, void *);
extern void undoably_install_low_level_interrupt_handler (
interrupt_thread_handler);
undoably_install_low_level_interrupt_handler(SIG_STOP_FOR_GC,
sig_stop_for_gc_handler);
+ undoably_install_low_level_interrupt_handler(SIG_RESUME_FROM_GC,
+ sig_resume_from_gc_handler);
#endif
}
#define SIG_MEMORY_FAULT SIGSEGV
#define SIG_INTERRUPT_THREAD (SIGRTMIN)
-#define SIG_STOP_FOR_GC (SIGRTMIN+1)
-
+#define SIG_STOP_FOR_GC (SIGUSR1)
+#define SIG_RESUME_FROM_GC (SIGUSR2)
interrupt_thread_handler);
undoably_install_low_level_interrupt_handler(SIG_STOP_FOR_GC,
sig_stop_for_gc_handler);
+ undoably_install_low_level_interrupt_handler(SIG_RESUME_FROM_GC,
+ sig_resume_from_gc_handler);
#endif
}
#define SIG_MEMORY_FAULT SIGSEGV
#define SIG_INTERRUPT_THREAD (SIGRTMIN)
-#define SIG_STOP_FOR_GC (SIGRTMIN+1)
-#define SIG_RESUME_FROM_GC (SIGRTMIN+2)
+#define SIG_STOP_FOR_GC (SIGUSR1)
+#define SIG_RESUME_FROM_GC (SIGUSR2)
/* Yaargh?! */
typedef int os_context_register_t ;
p->os_thread));
p->state=STATE_RUNNING;
-#if defined(SIG_RESUME_FROM_GC)
status=kill_thread_safely(p->os_thread,SIG_RESUME_FROM_GC);
-#else
- status=kill_thread_safely(p->os_thread,SIG_STOP_FOR_GC);
-#endif
if (status) {
lose("cannot resume thread=%lu: %d, %s\n",
p->os_thread,status,strerror(status));
}
}
}
- /* If we waited here until all threads leave STATE_SUSPENDED, then
- * SIG_STOP_FOR_GC wouldn't need to be a rt signal. That has some
- * performance implications, but does away with the 'rt signal
- * queue full' problem. */
lock_ret = pthread_mutex_unlock(&all_threads_lock);
gc_assert(lock_ret == 0);
#define SIG_INTERRUPT_THREAD (SIGRTMIN)
#define SIG_STOP_FOR_GC (SIGRTMIN+1)
+#define SIG_RESUME_FROM_GC (SIGRTMIN+4)
#define SIG_DEQUEUE (SIGRTMIN+2)
#define SIG_THREAD_EXIT (SIGRTMIN+3)
;;; checkins which aren't released. (And occasionally for internal
;;; versions, especially for internal versions off the main CVS
;;; branch, it gets hairier, e.g. "0.pre7.14.flaky4.13".)
-"1.0.25.27"
+"1.0.25.28"