From: Gabor Melis Date: Wed, 12 Oct 2005 12:18:59 +0000 (+0000) Subject: 0.9.5.46: threads X-Git-Url: http://repo.macrolet.net/gitweb/?a=commitdiff_plain;h=2a860441fcd4181c0a511094397fdc6b6511b280;p=sbcl.git 0.9.5.46: threads * sig_stop_for_gc_handler: sigwaitinfo returns a value for a reason, use it * removed obsolete, failing test --- diff --git a/NEWS b/NEWS index cc6228b..e9ad9cd 100644 --- a/NEWS +++ b/NEWS @@ -18,11 +18,11 @@ changes in sbcl-0.9.6 relative to sbcl-0.9.5: * bug fix: division by zero in sb-sprof when no samples were collected * bug fix: a race when a slow to arrive sigprof signal killed sbcl * bug fix: asdf-install uses CRLF as required by the HTTP spec. - (thanks to Alexander Kjeldaas) + (thanks to Alexander Kjeldaas) * new feature: ignoring the return values of destructive functions like NREVERSE signals a compile-time style-warning. (thanks to Kevin Reid) - * new feature: the alignment of alien structure fields can be + * new feature: the alignment of alien structure fields can be explicitly specified. (thanks to Cyrus Harmon) * threads ** bug fix: threads stacks belonging to dead threads are freed by the @@ -30,6 +30,8 @@ changes in sbcl-0.9.6 relative to sbcl-0.9.5: ** minor incompatible change: INTERRUPT-THREAD-ERROR-ERRNO removed ** WITH-RECURSIVE-LOCK can be nested in a WITH-MUTEX for the same lock ** bug fix: dynamic variable and thread start related gc lossage + ** bug fix: job control (SIGSTOP/SIGCONT) no longer confuses threads + suspended for gc * fixed some bugs revealed by Paul Dietz' test suite: ** SUBTYPEP is slightly more accurate on heinously complicated CONS types where some of the members have uncertain (in the diff --git a/src/runtime/interrupt.c b/src/runtime/interrupt.c index bc704e3..9c63983 100644 --- a/src/runtime/interrupt.c +++ b/src/runtime/interrupt.c @@ -696,7 +696,9 @@ sig_stop_for_gc_handler(int signal, siginfo_t *info, void *void_context) FSHOW_SIGNAL((stderr,"thread=%lu suspended\n",thread->os_thread)); sigemptyset(&ss); sigaddset(&ss,SIG_STOP_FOR_GC); - sigwaitinfo(&ss,0); + /* It is possible to get SIGCONT (and probably other + * non-blockable signals) here. */ + while (sigwaitinfo(&ss,0) != SIG_STOP_FOR_GC); FSHOW_SIGNAL((stderr,"thread=%lu resumed\n",thread->os_thread)); if(thread->state!=STATE_RUNNING) { lose("sig_stop_for_gc_handler: wrong thread state on wakeup: %ld\n", diff --git a/tests/threads.impure.lisp b/tests/threads.impure.lisp index d3cc162..8002d5b 100644 --- a/tests/threads.impure.lisp +++ b/tests/threads.impure.lisp @@ -470,16 +470,6 @@ (format t "~&creation test done~%") -;; watch out for *current-thread* being the parent thread after exit -(let* (sap - (thread (sb-thread:make-thread - (lambda () - (setq sap (thread-sap-for-id - (thread-os-thread *current-thread*))))))) - (wait-for-threads (list thread)) - (assert (null (symbol-value-in-thread 'sb-thread:*current-thread* - sap)))) - ;; interrupt handlers are per-thread with pthreads, make sure the ;; handler installed in one thread is global (sb-thread:make-thread diff --git a/version.lisp-expr b/version.lisp-expr index 1176cb4..d1e1b02 100644 --- a/version.lisp-expr +++ b/version.lisp-expr @@ -17,4 +17,4 @@ ;;; 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.9.5.45" +"0.9.5.46"