+(defun make-process-lock (name)
+ #+allegro (mp:make-process-lock :name name)
+ #+scl (thread:make-lock name)
+ #+lispworks (mp:make-lock :name name)
+ #-(or allegro scl lispworks) (declare (ignore name))
+ #-(or allegro scl lispworks) nil)
+
+(defmacro with-process-lock ((lock desc) &body body)
+ #+scl `(thread:with-lock-held (,lock ,desc) ,@body)
+ #+(or allegro lispworks)
+ (declare (ignore desc))
+ #+(or allegro lispworks)
+ (let ((l (gensym)))
+ `(let ((,l ,lock))
+ #+allegro (mp:with-process-lock (,l) ,@body)
+ #+lispworks (mp:with-lock (,l) ,@body)))
+ #-(or scl allegro lispworks) (declare (ignore lock desc))
+ #-(or scl allegro lispworks) `(progn ,@body))
+