From 42fa780cd7704e4a30fd25ff60ddedddf53bcd4d Mon Sep 17 00:00:00 2001 From: Juan Jose Garcia Ripoll Date: Sat, 5 Sep 2009 12:48:36 +0200 Subject: [PATCH] src/lsp/mp.lsp: use prefixes for names in SI/EXT packages. --- src/lsp/mp.lsp | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/src/lsp/mp.lsp b/src/lsp/mp.lsp index 4fd5e3007..3917f08b0 100644 --- a/src/lsp/mp.lsp +++ b/src/lsp/mp.lsp @@ -13,7 +13,7 @@ #-threads (defpackage "MP" - (:use "CL") + (:use "CL" "SI") (:export "WITH-LOCK" "WITHOUT-INTERRUPTS")) (in-package "MP") @@ -59,31 +59,31 @@ WITHOUT-INTERRUPTS in: ;; regardless of the interrupt policy in effect when it is called. (lambda () (with-local-interrupts ...))) " - (with-unique-names (outer-allow-with-interrupts outer-interrupts-enabled) + (ext:with-unique-names (outer-allow-with-interrupts outer-interrupts-enabled) `(multiple-value-prog1 (macrolet ((allow-with-interrupts (&body allow-forms) - `(let ((*allow-with-interrupts* ,',outer-allow-with-interrupts)) + `(let ((si:*allow-with-interrupts* ,',outer-allow-with-interrupts)) ,@allow-forms)) (with-restored-interrupts (&body with-forms) - `(let ((*interrupts-enabled* ,',outer-interrupts-enabled)) + `(let ((si:*interrupts-enabled* ,',outer-interrupts-enabled)) ,@with-forms)) (with-local-interrupts (&body with-forms) - `(let* ((*allow-with-interrupts* ,',outer-allow-with-interrupts) - (*interrupts-enabled* ,',outer-allow-with-interrupts)) + `(let* ((si:*allow-with-interrupts* ,',outer-allow-with-interrupts) + (si:*interrupts-enabled* ,',outer-allow-with-interrupts)) (when ,',outer-allow-with-interrupts (si::check-pending-interrupts)) (locally ,@with-forms)))) - (let* ((,outer-interrupts-enabled *allow-with-interrupts*) - (*interrupts-enabled* nil) - (,outer-allow-with-interrupts *allow-with-interrupts*) - (*allow-with-interrupts* nil)) + (let* ((,outer-interrupts-enabled si:*interrupts-enabled*) + (si:*interrupts-enabled* nil) + (,outer-allow-with-interrupts si:*allow-with-interrupts*) + (si:*allow-with-interrupts* nil)) (declare (ignorable ,outer-allow-with-interrupts ,outer-interrupts-enabled)) ,@body)) - (when *interrupts-enabled* + (when si:*interrupts-enabled* (si::check-pending-interrupts))))) -(defmacro with-lock ((lock) &body body) +(defmacro with-lock ((lock-form) &body body) #-threads `(progn ,@body) ;; Why do we need %count? Even if get-lock succeeeds, an interrupt may @@ -96,8 +96,8 @@ WITHOUT-INTERRUPTS in: ;; the get-lock statement, to ensure that the unlocking is done with ;; interrupts disabled. #+threads - (with-unique-names (lock count interrupts) - `(let* ((,lock ,lock) + (ext:with-unique-names (lock count interrupts) + `(let* ((,lock ,lock-form) (,count (mp:lock-count ,lock))) (without-interrupts (unwind-protect