After vast effort (mostly Christophe's) we have a fix for the
hangs in multithreaded CLX. Under some circumstances we could
be trying to scavenge one thread's stack using the stack
pointer from another: needless to say, this is not too effective.
When sleeping on a queue, loop around sigwaitinfo restarting
it until it stops returning EINTR
* handler, you will lose. */
for_each_thread(th) {
void **ptr;
- void **esp= (void **) &raise;
+ void **esp=(void **)-1;
int i,free;
#ifdef LISP_FEATURE_SB_THREAD
- if(th!=arch_os_get_current_thread()) {
+ if(th==arch_os_get_current_thread()) {
+ esp = (void **) &raise;
+ } else {
void **esp1;
free=fixnum_value(SymbolValue(FREE_INTERRUPT_CONTEXT_INDEX,th));
for(i=free-1;i>=0;i--) {
}
}
}
+#else
+ esp = (void **) &raise;
#endif
for (ptr = (void **)th->control_stack_end; ptr > esp; ptr--) {
preserve_pointer(*ptr);
#include <sched.h>
#include <signal.h>
#include <stddef.h>
+#include <errno.h>
#ifndef CLONE_PARENT /* lameass glibc 2.2 doesn't define this */
#define CLONE_PARENT 0x00008000 /* even though the manpage documents it */
#endif
sigset_t set;
sigemptyset(&set);
sigaddset(&set,SIGCONT);
- sigwaitinfo(&set,0);
+ do {
+ errno=0;
+ sigwaitinfo(&set,0);
+ }while(errno==EINTR);
sigprocmask(SIG_UNBLOCK,&set,0);
}
* for them on each time around */
for(p=all_threads;p!=tail;p=p->next) {
if(p==th) continue;
- countdown_to_gc++;
- kill(p->pid,SIG_STOP_FOR_GC);
+ countdown_to_gc++;
+ kill(p->pid,SIG_STOP_FOR_GC);
}
tail=all_threads;
} else {
;;; 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".)
-"0.8.3.86"
+"0.8.3.87"