anchor.diff:  (defmacro condition-wait-for ((condition-variable mutex &optional timeout) &body predicate)
     "Evaluate PREDICATE in a loop, waiting on CONDITION-VARIABLE until PREDICATE returns true.
   Returns the first non-NIL result of PREDICATE, or NIL if a timeout occurs.
  +The second return value is the remaining timeout, or NIL if no timeout was specified.
   A block named NIL is defined allowing RETURN to be used within the predicate.
   Handles timeouts properly."
     (let ((timeout-sym (gensym "TIMEOUT"))
  
positive.code:        (block nil
           (flet ((,predicate-fn () (progn ,@predicate)))
             (cond ((eql ,timeout-sym 0)
                    (,predicate-fn))
                   (,timeout-sym
                    (mezzano.supervisor:with-timer (,timer-sym :relative ,timeout-sym
                                                               :name ,cvar-sym)
                      (loop
                         (let ((,prediate-result-sym (,predicate-fn)))
                           (when ,prediate-result-sym (return ,prediate-result-sym)))
                         (when (mezzano.supervisor:timer-expired-p ,timer-sym)
                           (return nil))
                         (condition-wait ,cvar-sym ,mutex-sym ,timer-sym))))
                   (t
                    (loop
                       (let ((,prediate-result-sym (,predicate-fn)))
                         (when ,prediate-result-sym (return ,prediate-result-sym)))
                       (condition-wait ,cvar-sym ,mutex-sym)))))))))
  
  (defun condition-wait (condition-variable mutex &optional timeout)
  
negative.code:        (block nil
           (flet ((,predicate-fn () (progn ,@predicate)))
             (cond ((eql ,timeout-sym 0)
                    (values (,predicate-fn) 0))
                   (,timeout-sym
                    (mezzano.supervisor:with-timer (,timer-sym :relative ,timeout-sym :name ,event-sym)
                      (loop
                         (let ((,prediate-result-sym (,predicate-fn)))
                           (when ,prediate-result-sym
                             (return (values ,prediate-result-sym
                                             (timer-remaining ,timer-sym)))))
                         (when (mezzano.supervisor:timer-expired-p ,timer-sym)
                           (return (values nil 0)))
                         (mezzano.supervisor:wait-for-objects ,timer-sym ,event-sym))))
                   (t
                    (loop
                       (let ((,prediate-result-sym (,predicate-fn)))
                         (when ,prediate-result-sym
                           (return (values ,prediate-result-sym nil))))
                       (mezzano.supervisor:event-wait ,event-sym)))))))))
  
  (defun event-wait (event)
  