anchor.diff:    (lock (make-spinlock :name name))
     (owner nil))
   
  +(defun mutex-held-p (mutex &optional (process (current-process)))
  +  "Return true if MUTEX is held by PROCESS."
  +  (eql (mutex-owner mutex) process))
  +
   (defun call-with-mutex (fn mutex wait-p timeout)
     (assert (%interrupt-state))
     (let ((got-it nil))
  
positive.code: 
  (defun %maybe-preempt-from-interrupt-frame ()
    "Return a process to switch to, or NIL if the current process should keep running."
    (let ((next-process (or (get-next-process)
                            *idle-process*)))
      ;; Must not preempt the GC, or try to switch to current process.
      (when (and *preemption-enabled*
                 (not *gc-in-progress*)
                 (not (eql next-process *current-process*)))
        (setf *current-process* next-process)
        (process-stack-group next-process))))
  
  (defun idle-process ()
    (%cli)
    (loop
       (let ((next-process (get-next-process)))
         (cond (next-process
                (setf *current-process* next-process)
  
negative.code:   (setf (process-whostate *current-process*) reason
          (process-wait-function *current-process*) function
          (process-wait-argument-list *current-process*) arguments)
    (process-yield)
    (setf (process-whostate *current-process*) nil))
  
  ;; todo, Fix this...
  (defun process-wait-with-timeout (reason timeout function &rest arguments)
    "Poll FUNCTION until it returns true, or until timeout expires.
  Returns true if the timeout has not expired. TIMEOUT may be false, for infinite timeout."
    (declare (dynamic-extent arguments))
    (cond (timeout
           (process-wait reason (lambda ()
                                  (if (<= (decf timeout) 0)
                                      t
                                      (apply function arguments))))
           (> timeout 0))
          (t (apply #'process-wait reason function arguments)
             t)))
  
  