X-Git-Url: http://git.kpe.io/?a=blobdiff_plain;f=sql%2Futils.lisp;h=fe5a24ce63aa930444708a10bbc233d929b49c67;hb=3d6ed9e79589fd20effdd2b896a5bb2e9a6e8670;hp=e6176cbb0a18f110620931938172e74b91472d3b;hpb=e567409d9fff3f7231c2a0bb69b345e19de2b246;p=clsql.git diff --git a/sql/utils.lisp b/sql/utils.lisp index e6176cb..fe5a24c 100644 --- a/sql/utils.lisp +++ b/sql/utils.lisp @@ -57,11 +57,25 @@ (string identifier)))) (substitute #\_ #\- unescaped))) +#+lispworks +(defvar +lw-has-without-preemption+ + #+lispworks6 nil + #-lispworks6 t) +#+lispworks +(defvar +lw-global-lock+ + (unless +lw-has-without-preemption+ + (mp:make-lock :name "CLSQL" :important-p nil :safep t :recursivep nil + :sharing t))) + (defmacro without-interrupts (&body body) #+allegro `(mp:without-scheduling ,@body) #+clisp `(progn ,@body) #+cmu `(system:without-interrupts ,@body) - #+lispworks `(mp:without-preemption ,@body) + #+lispworks + (if +lw-has-without-preemption+ + `(mp:without-preemption ,@body) + `(mp:with-exclusive-lock (+lw-global-lock+) + ,@body)) #+openmcl `(ccl:without-interrupts ,@body) #+sbcl `(sb-sys::without-interrupts ,@body))