From: Nikodemus Siivola Date: Fri, 13 Apr 2007 10:22:30 +0000 (+0000) Subject: 1.0.4.79: remove lock from *descriptor-handlers* X-Git-Url: http://repo.macrolet.net/gitweb/?a=commitdiff_plain;h=8cd0537738745bc866b69c4132cac6c881d67405;p=sbcl.git 1.0.4.79: remove lock from *descriptor-handlers* * Each thread binds it, so no locking required. WITHOUT-INTERRUPTS still needed, however. --- diff --git a/NEWS b/NEWS index eb6a9d6..0f25da1 100644 --- a/NEWS +++ b/NEWS @@ -22,7 +22,7 @@ changes in sbcl-1.0.5 relative to sbcl-1.0.4: to global variables using SYMBOL-VALUE and a constant argument. * enhancement: SIGINT now causes a specific condition SB-SYS:INTERACTIVE-INTERRUPT to be signalled. - * bug fix: adding and removing fd-handlers is now thread-safe. + * bug fix: adding and removing fd-handlers is now interrupt-safe. * bug fix: inlined calls to C now ensure 16byte stack alignment on x86/Darwin. * bug fix: bad type declaration in the CLOS implementation has diff --git a/src/code/serve-event.lisp b/src/code/serve-event.lisp index 02358fb..50fce5d 100644 --- a/src/code/serve-event.lisp +++ b/src/code/serve-event.lisp @@ -42,17 +42,11 @@ #!+sb-doc "List of all the currently active handlers for file descriptors") -(defvar *descriptor-handler-lock* - (sb!thread::make-spinlock :name "descriptor handle lock")) - (sb!xc:defmacro with-descriptor-handlers (&body forms) ;; FD-STREAM functionality can add and remove descriptors on it's - ;; own, and two threads adding add the same time could lose one. - ;; - ;; This is never held for long, so a spinlock is fine. - `(without-interrupts - (sb!thread::with-spinlock (*descriptor-handler-lock*) - ,@forms))) + ;; own, so getting an interrupt while modifying this and the + ;; starting to recursively modify it could lose... + `(without-interrupts ,@forms)) (defun list-all-descriptor-handlers () (with-descriptor-handlers diff --git a/src/code/target-package.lisp b/src/code/target-package.lisp index a8ccd00..a8598ad 100644 --- a/src/code/target-package.lisp +++ b/src/code/target-package.lisp @@ -78,7 +78,7 @@ res))) ;;; Destructively resize TABLE to have room for at least SIZE entries -;;; and rehash its existing entries. +;;; and rehash its existing entries. (defun resize-package-hashtable (table size) (let* ((vec (package-hashtable-table table)) (hash (package-hashtable-hash table)) diff --git a/version.lisp-expr b/version.lisp-expr index 1bf9991..245a14e 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".) -"1.0.4.78" +"1.0.4.79"