;;;; -*- coding: utf-8; -*-
+changes in sbcl-1.0.6 relative to sbcl-1.0.5:
+ * bug fix: GETHASH, (SETF GETHASH), CLRHASH and REMHASH are now
+ interrupt safe.
+
changes in sbcl-1.0.5 relative to sbcl-1.0.4:
* incompatible change: removed writer methods for host-ent-name,
host-ent-addresses -- changing the values did not update the DNS
locks, application code can never be certain that this invariant is
maintained."
`(unwind-protect
- (without-interrupts
- (let ((*gc-inhibit* t))
- ,@body))
- ;; the test is racy, but it can err only on the overeager side
- (sb!kernel::maybe-handle-pending-gc)))
+ (let* ((*interrupts-enabled* nil)
+ (*gc-inhibit* t))
+ ,@body)
+ (when (or (and *interrupts-enabled* *interrupt-pending*)
+ (and (not *gc-inhibit*)
+ (or *gc-pending* #!+sb-thread *stop-for-gc-pending*)))
+ (sb!unix::receive-pending-interrupt))))
\f
;;; EOF-OR-LOSE is a useful macro that handles EOF.
\f
;;;; utilities
-;; This stuff is performance critical and unwind-protect is too
-;; slow. And without the locking the next vector can get cyclic
-;; causing looping in a WITHOUT-GCING form, SHRINK-VECTOR can corrupt
-;; memory and who knows what else.
+;;; Without the locking the next vector can get cyclic causing
+;;; looping in a WITHOUT-GCING form, SHRINK-VECTOR can corrupt memory
+;;; and who knows what else.
+;;;
+;;; WITHOUT-GCING implies WITHOUT-INTERRUPTS.
(defmacro with-spinlock-and-without-gcing ((spinlock) &body body)
#!-sb-thread
(declare (ignore spinlock))
- (with-unique-names (old-gc-inhibit old-interrupts-enabled)
- `(let ((,old-gc-inhibit *gc-inhibit*)
- (,old-interrupts-enabled *interrupts-enabled*)
- (*interrupts-enabled* nil)
- (*gc-inhibit* t))
+ `(without-gcing
(unwind-protect
(progn
#!+sb-thread
(sb!thread::get-spinlock ,spinlock)
,@body)
#!+sb-thread
- (sb!thread::release-spinlock ,spinlock)
- (let ((*interrupts-enabled* ,old-interrupts-enabled)
- (*gc-inhibit* ,old-gc-inhibit))
- ;; the test is racy, but it can err only on the overeager
- ;; side
- (sb!kernel::maybe-handle-pending-gc))))))
+ (sb!thread::release-spinlock ,spinlock))))
(eval-when (:compile-toplevel :load-toplevel :execute)
(defconstant max-hash sb!xc:most-positive-fixnum))