;; hasn't been defined by DEFUN. (FIXME: is this right? This logic
;; comes from CMUCL). -- CSR, 2004-12-31
(when (and (consp new-name)
- (member (car new-name) '(method fast-method slot-accessor)))
+ (member (car new-name) '(slow-method fast-method slot-accessor)))
(setf (fdefinition new-name) fun))
fun)
\f
#+sb-thread
(progn
-(defstruct spinlock (value 0))
-(defvar *pcl-lock* (make-spinlock))
+ (defvar *pcl-lock* (sb-thread:make-waitqueue))
-(defmacro with-pcl-lock (&body body)
- `(progn
- (sb-thread::get-spinlock *pcl-lock* 1 (sb-thread::current-thread-id))
- (unwind-protect
- (progn ,@body)
- (setf (spinlock-value *pcl-lock*) 0))))
-);progn
+ (defmacro with-pcl-lock (&body body)
+ `(sb-thread::with-spinlock (*pcl-lock*)
+ ,@body)))
#-sb-thread
(defmacro with-pcl-lock (&body body)