[bknr-cvs] r2237 - branches/trunk-reorg/bknr/datastore/src/utils

bknr at bknr.net bknr at bknr.net
Sun Oct 14 19:25:01 UTC 2007


Author: hhubner
Date: 2007-10-14 15:25:01 -0400 (Sun, 14 Oct 2007)
New Revision: 2237

Modified:
   branches/trunk-reorg/bknr/datastore/src/utils/acl-mp-compat.lisp
Log:
OpenMCL locking primitives


Modified: branches/trunk-reorg/bknr/datastore/src/utils/acl-mp-compat.lisp
===================================================================
--- branches/trunk-reorg/bknr/datastore/src/utils/acl-mp-compat.lisp	2007-10-14 19:13:17 UTC (rev 2236)
+++ branches/trunk-reorg/bknr/datastore/src/utils/acl-mp-compat.lisp	2007-10-14 19:25:01 UTC (rev 2237)
@@ -1,12 +1,17 @@
 (in-package :bknr.utils)
 
+#+(not (or allegro sbcl cmu openmcl))
+(error "missing port for this compiler, please provide for locking primitives for this compiler in ~A" *load-pathname*)
+
 (defun mp-make-lock (&optional (name "Anonymous"))
   #+allegro
   (mp:make-process-lock :name name)
   #+sbcl
   (sb-thread:make-mutex :name name)
   #+cmu
-  (mp:make-lock name))
+  (mp:make-lock name)
+  #+openmcl
+  (ccl:make-lock name))
 
 (defmacro mp-with-lock-held ((lock) &rest body)
   #+allegro
@@ -17,6 +22,9 @@
      , at body)
   #+cmu
   `(mp:with-lock-held (,lock)
+    , at body)
+  #+openmcl
+  `(ccl:with-lock-grabbed (,lock)
     , at body))
 
 (defmacro mp-with-recursive-lock-held ((lock) &rest body)
@@ -28,4 +36,7 @@
      , at body)
   #+cmu
   `(mp:with-lock-held (,lock)
+    , at body)
+  #+openmcl
+  `(ccl:with-lock-grabbed (,lock)
     , at body))




More information about the Bknr-cvs mailing list