(declare (function function))
(flet ((%call-with-system-mutex ()
(dx-let (got-it)
- #-sb-xc-host (declare (optimize sb!c::stack-allocate-value-cells))
(unwind-protect
(when (setf got-it (get-mutex mutex))
(funcall function))
(declare (function function))
(without-interrupts
(dx-let (got-it)
- #-sb-xc-host (declare (optimize sb!c::stack-allocate-value-cells))
(unwind-protect
(when (setf got-it (get-spinlock spinlock))
(funcall function))
(flet ((%call-with-system-spinlock ()
(dx-let ((inner-lock-p (eq *current-thread* (spinlock-value spinlock)))
(got-it nil))
- #-sb-xc-host (declare (optimize sb!c::stack-allocate-value-cells))
(unwind-protect
(when (or inner-lock-p (setf got-it (get-spinlock spinlock)))
(funcall function))
(defun call-with-spinlock (function spinlock)
(declare (function function))
(dx-let ((got-it nil))
- #-sb-xc-host (declare (optimize sb!c::stack-allocate-value-cells))
(without-interrupts
(unwind-protect
(when (setf got-it (allow-with-interrupts
(defun call-with-mutex (function mutex value waitp)
(declare (function function))
(dx-let ((got-it nil))
- #-sb-xc-host (declare (optimize sb!c::stack-allocate-value-cells))
(without-interrupts
(unwind-protect
(when (setq got-it (allow-with-interrupts
(declare (function function))
(dx-let ((inner-lock-p (eq (mutex-%owner mutex) *current-thread*))
(got-it nil))
- #-sb-xc-host (declare (optimize sb!c::stack-allocate-value-cells))
(without-interrupts
(unwind-protect
(when (or inner-lock-p (setf got-it (allow-with-interrupts
(declare (function function))
(dx-let ((inner-lock-p (eq (spinlock-value spinlock) *current-thread*))
(got-it nil))
- #-sb-xc-host (declare (optimize sb!c::stack-allocate-value-cells))
(without-interrupts
(unwind-protect
(when (or inner-lock-p (setf got-it (allow-with-interrupts