anchor.diff:        (return-from semaphore-down t))
       (cond (wait-p
              ;; Go to sleep.
  -           (push-wait-queue self mutex)
  +           (push-wait-queue self semaphore)
              ;; Now sleep.
              ;; Must take the thread lock before dropping the semaphore lock or up
              ;; may be able to remove the thread from the sleep queue before it goes
  
positive.code:           (t (unlock-wait-queue semaphore)
               (sys.int::%sti)
               nil))))
  
  (defstruct (fifo
               (:area :wired)
  
negative.code:   `(call-with-pseudo-atomic (dx-lambda () ,@body)))
  
  ;;; Common structure for sleepable things.
  (defstruct (wait-queue
               (:area :wired))
    name
    ;; Spin mutexes also abuse this field as a place to store the old interrupt state.
    (%lock :unlocked) ; must be 2nd slot.
  