X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fruntime%2Finterrupt.c;h=502c2cda0ca6d62033d225e5ee9cece9da7468f9;hb=952798e77d09b8dcc27d8eea4f22cab552528ae7;hp=1578aca75ce55bf456467002ccfb4f8eeeee2b94;hpb=3f757cc9b3d6f14600365b7c0dd7d213269d7242;p=sbcl.git diff --git a/src/runtime/interrupt.c b/src/runtime/interrupt.c index 1578aca..502c2cd 100644 --- a/src/runtime/interrupt.c +++ b/src/runtime/interrupt.c @@ -547,11 +547,19 @@ sig_stop_for_gc_handler(int signal, siginfo_t *info, void *void_context) * awful state, to stop them from being waited for indefinitely. * Userland reaping is done later when GC is finished */ mark_dead_threads(); - + if(thread->state!=STATE_STOPPING) { + lose("sig_stop_for_gc_handler: wrong thread state: %ld\n", + fixnum_value(thread->state)); + } thread->state=STATE_STOPPED; sigemptyset(&ss); sigaddset(&ss,SIG_STOP_FOR_GC); sigwaitinfo(&ss,0); + if(thread->state!=STATE_STOPPED) { + lose("sig_stop_for_gc_handler: wrong thread state on wakeup: %ld\n", + fixnum_value(thread->state)); + } + thread->state=STATE_RUNNING; undo_fake_foreign_function_call(context); }