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

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 @@ ,@body) #+cmu `(mp:with-lock-held (,lock) + ,@body) + #+openmcl + `(ccl:with-lock-grabbed (,lock) ,@body)) (defmacro mp-with-recursive-lock-held ((lock) &rest body) @@ -28,4 +36,7 @@ ,@body) #+cmu `(mp:with-lock-held (,lock) + ,@body) + #+openmcl + `(ccl:with-lock-grabbed (,lock) ,@body))
participants (1)
-
bknr@bknr.net