[tbnl-devel] Re: problem with the example

Edi Weitz edi at agharta.de
Sat Mar 19 20:30:27 UTC 2005


Maybe like this (again untested):

  #+:sbcl
  (defvar *locks* nil)

  #-:sbcl
  (defmacro with-lock-held* ((lock) &body body)
    `(kmrcl::with-lock-held (,lock)
       , at body))

  #+:sbcl
  (defmacro with-lock-held* ((lock) &body body)
    (with-rebinding (lock)
      `(cond ((find ,lock *locks*) , at body)
             (t (let ((*locks* (cons ,lock *locks*)))
                  (kmrcl::with-lock-held (,lock)
                    , at body))))))



More information about the Tbnl-devel mailing list