(funcall fun part))))
(when ext
(let ((table sb-pcl::*eql-specializer-table*))
- (call (sb-ext:with-locked-hash-table (table)
+ (call (sb-int:with-locked-system-table (table)
(gethash object table)))))
(etypecase object
((or bignum float sb-sys:system-area-pointer fixnum))
;; Stack allocation without any questions asked
"TRULY-DYNAMIC-EXTENT"
+ ;; Like WITH-LOCKED-HASH-TABLE, but disabled interrupts
+ "WITH-LOCKED-SYSTEM-TABLE"
+
;; generic set implementation
"ADD-TO-XSET"
"ALLOC-XSET"
(defun find-classoid-cell (name &key create errorp)
(let ((table *classoid-cells*)
(real-name (uncross name)))
- (or (with-locked-hash-table (table)
+ (or (with-locked-system-table (table)
(or (gethash real-name table)
(when create
(setf (gethash real-name table) (make-classoid-cell real-name)))))
(defun insured-find-classoid (name predicate constructor)
(declare (type function predicate constructor))
(let ((table *forward-referenced-layouts*))
- (with-locked-hash-table (table)
+ (with-locked-system-table (table)
(let* ((old (find-classoid name nil))
(res (if (and old (funcall predicate old))
old
(declare (ignore table))
`(progn ,@body))
+(defmacro with-locked-system-table ((table) &body body)
+ (declare (ignore table))
+ `(progn ,@body))
+
(defmacro defglobal (name value &rest doc)
`(eval-when (:compile-toplevel :load-toplevel :execute)
(defparameter ,name
;;; and retains roots to functions that might otherwise be collected.
(defun make-compiled-debug-fun (compiler-debug-fun component)
(let ((table *compiled-debug-funs*))
- (with-locked-hash-table (table)
+ (with-locked-system-table (table)
(or (gethash compiler-debug-fun table)
(setf (gethash compiler-debug-fun table)
(%make-compiled-debug-fun compiler-debug-fun component))))))
"Return a hash-table containing only the entries in Table1 whose key is not
also a key in Table2." (declare (type hash-table table1 table2))
(let ((res (make-hash-table-like table1)))
- (with-locked-hash-table (table2)
+ (with-locked-system-table (table2)
(dohash ((k v) table1 :locked t)
(unless (nth-value 1 (gethash k table2))
(setf (gethash k res) v))))
,@forms)))))
`(let ((,n-table ,table))
,(if locked
- `(with-locked-hash-table (,n-table)
+ `(with-locked-system-table (,n-table)
,iter-form)
iter-form))))))
\f
;; Needless to say, this also excludes some internal bits, but
;; getting there is too much detail when "unspecified" says what
;; is important -- unpredictable, but harmless.
+ `(sb!thread::with-recursive-spinlock ((hash-table-spinlock ,hash-table))
+ ,@body))
+
+(defmacro-mundanely with-locked-system-table ((hash-table) &body body)
`(sb!thread::with-recursive-system-spinlock
((hash-table-spinlock ,hash-table))
,@body))
;;; in the linkage table.
(defun ensure-foreign-symbol-linkage (name datap)
(/show0 "ensure-foreign-symbol-linkage")
- (with-locked-hash-table (*linkage-info*)
+ (with-locked-system-table (*linkage-info*)
(let ((info (or (gethash (cons name datap) *linkage-info*)
(link-foreign-symbol name datap))))
(linkage-info-address info))))
((not fun)
;; Someone has FMAKUNBOUND it.
(let ((table *traced-funs*))
- (with-locked-hash-table (table)
+ (with-locked-system-table (table)
(maphash (lambda (fun info)
(when (equal function-or-name (trace-info-what info))
(remhash fun table)))
(defmacro with-package-names ((names &key) &body body)
`(let ((,names *package-names*))
- (with-locked-hash-table (,names)
+ (with-locked-system-table (,names)
,@body)))
\f
;;;; PACKAGE-HASHTABLE stuff
;;; a new one if necessary.
(defun intern-logical-host (thing)
(declare (values logical-host))
- (with-locked-hash-table (*logical-hosts*)
+ (with-locked-system-table (*logical-hosts*)
(or (find-logical-host thing nil)
(let* ((name (logical-word-or-lose thing))
(new (make-logical-host :name name)))
(defun intern-eql-specializer (object)
;; Need to lock, so that two threads don't get non-EQ specializers
;; for an EQL object.
- (with-locked-hash-table (*eql-specializer-table*)
+ (with-locked-system-table (*eql-specializer-table*)
(or (gethash object *eql-specializer-table*)
(setf (gethash object *eql-specializer-table*)
(make-instance 'eql-specializer :object object)))))
nil))
\f
;;; Not synchronized, as all the uses we have for it are multiple ones
-;;; and need WITH-LOCKED-HASH-TABLE in any case.
+;;; and need WITH-LOCKED-SYSTEM-TABLE in any case.
;;;
;;; FIXME: Is it really more efficient to store this stuff in a global
;;; table instead of having a slot in each method?
(defun flush-effective-method-cache (generic-function)
(let ((cache *effective-method-cache*))
- (with-locked-hash-table (cache)
+ (with-locked-system-table (cache)
(dolist (method (generic-function-methods generic-function))
(remhash method cache)))))
(call-no-applicable-method gf args)))
(let* ((key (car methods))
(ht *effective-method-cache*)
- (ht-value (with-locked-hash-table (ht)
+ (ht-value (with-locked-system-table (ht)
(or (gethash key ht)
(setf (gethash key ht) (cons nil nil))))))
(if (and (null (cdr methods)) all-applicable-p ; the most common case
(defvar *fgens* (make-hash-table :test #'equal :synchronized t))
(defun ensure-fgen (test gensyms generator generator-lambda system)
- (with-locked-hash-table (*fgens*)
+ (with-locked-system-table (*fgens*)
(let ((old (lookup-fgen test)))
(cond (old
(setf (fgen-generator old) generator)
\f
(defmacro precompile-function-generators (&optional system)
(let (collect)
- (with-locked-hash-table (*fgens*)
+ (with-locked-system-table (*fgens*)
(maphash (lambda (test fgen)
(when (or (null (fgen-system fgen))
(eq (fgen-system fgen) system))
(let ((type (slot-definition-type slotd)))
(values
(when (and (neq t type) (safe-p (slot-definition-class slotd)))
- (with-locked-hash-table (**typecheck-cache**)
+ (with-locked-system-table (**typecheck-cache**)
(or (gethash type **typecheck-cache**)
(setf (gethash type **typecheck-cache**)
(handler-bind (((or style-warning compiler-note)
;;; 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.48.30"
+"1.0.48.31"