anchor.diff:  (defun idle-thread ()
     (%disable-interrupts)
     (decrement-n-running-cpus)
  -  (loop
  -     ;; Must be running on the right CPU.
  -     (ensure (eql (current-thread) (local-cpu-idle-thread)))
  -     ;; Make sure the preemption timer has been properly switched off when
  -     ;; the system idles. Not needed to be correct, but reduces activity
  -     ;; when idle.
  -     (ensure (not (preemption-timer-remaining)))
  -     ;; Look for a thread to switch to.
  -     (acquire-global-thread-lock)
  -     (let ((next (cond (*world-stopper*
  -                        (cond ((pop-run-queue-1 *supervisor-priority-run-queue*))
  -                              ((eql (thread-state *world-stopper*) :runnable)
  -                               *world-stopper*)
  -                              (t nil)))
  -                       (t
  -                        (pop-run-queue)))))
  -       (cond (next
  -              (ensure (not (eql next (local-cpu-idle-thread))))
  -              (when (and (not *world-stopper*) ; No preemption when running with the world stopped.
  -                         (other-threads-ready-to-run-p))
  -                (preemption-timer-reset *timeslice-length*))
  -              (increment-n-running-cpus)
  -              ;; Switch to thread.
  -              (setf (thread-state next) :active)
  -              (setf (thread-state (local-cpu-idle-thread)) :runnable)
  -              (%run-on-wired-stack-without-interrupts (sp fp next)
  -                (%%switch-to-thread-via-wired-stack (local-cpu-idle-thread) sp fp next))
  -              (%disable-interrupts)
  -              (decrement-n-running-cpus))
  -             (t ;; Wait for an interrupt.
  -              (release-global-thread-lock)
  -              (%wait-for-interrupt)
  -              (%disable-interrupts))))))
  +  (let ((self (current-thread)))
  +    (loop
  +       ;; Must be running on the right CPU.
  +       (ensure (eql self (local-cpu-idle-thread)))
  +       ;; Make sure the preemption timer has been properly switched off when
  +       ;; the system idles. Not needed to be correct, but reduces activity
  +       ;; when idle.
  +       (ensure (not (preemption-timer-remaining)))
  +       ;; Look for a thread to switch to.
  +       (acquire-global-thread-lock)
  +       (setf (thread-state self) :runnable)
  +       (let ((next (update-run-queue)))
  +         (cond ((not (eql next self))
  +                (increment-n-running-cpus)
  +                ;; Switch to thread.
  +                (%run-on-wired-stack-without-interrupts (sp fp next self)
  +                  (%%switch-to-thread-via-wired-stack self sp fp next))
  +                (%disable-interrupts)
  +                (decrement-n-running-cpus))
  +               (t ;; Wait for an interrupt.
  +                (release-global-thread-lock)
  +                (%wait-for-interrupt)
  +                (%disable-interrupts)))))))
   
   (defun increment-n-running-cpus ()
     (let ((prev (sys.int::%atomic-fixnum-add-symbol '*n-running-cpus* 1)))
  
positive.code:                     ;; Fall back on idle.
                      (local-cpu-idle-thread))))))))
  
  ;;; Thread switching.
  
  (defun thread-yield ()
  
negative.code:   ;; Interrupts must be off and the global thread lock must be held.
    ;; Releases the thread lock and reenables interrupts.
    (ensure-global-thread-lock-held)
    (let ((next (update-run-queue))
          (current (current-thread)))
      (cond ((eql next current)
             ;; Staying on the same thread, unlock and return.
             (release-global-thread-lock)
             (%%return-to-same-thread sp fp))
            (t
             (%%switch-to-thread-via-wired-stack current sp fp next)))
      (panic "unreachable")))
  
  (defun %reschedule-via-interrupt (interrupt-frame)
    ;; Switch to the next thread saving the full state.
    ;; Interrupts must be off and the global thread lock must be held.
    ;; Releases the thread lock and reenables interrupts.
    (ensure-global-thread-lock-held)
    (let ((next (update-run-queue))
          (current (current-thread)))
      (%%switch-to-thread-via-interrupt current interrupt-frame next)))
  
  (defun maybe-preempt-via-interrupt (interrupt-frame)
  