Skip to content

Commit

Permalink
Add with-unlocked-system-packages
Browse files Browse the repository at this point in the history
  • Loading branch information
yitzchak committed Feb 22, 2023
1 parent d33a8dc commit c2f06f3
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 2 deletions.
22 changes: 21 additions & 1 deletion code/locks.lisp
Expand Up @@ -93,14 +93,34 @@
#-(or allegro ccl clisp cmucl ecl sb-package-locks)
`(progn ,@body))

(defmacro with-unlocked-system-packages (&body body)
#+allegro
`(excl:without-package-locks ,@body)
#+ccl
`(let ((ccl:*warn-if-redefine-kernel* nil))
,@body)
#+clisp
`(ext:without-package-lock () ,@body)
#+cmucl
`(eval-when (:compile-toplevel :load-toplevel :execute)
(ext:without-package-locks ,@body))
#+ecl
`(ext:without-package-locks ,@body)
#+sb-package-locks
`(sb-ext:without-package-locks ,@body)
#-(or allegro ccl clisp cmucl ecl sb-package-locks)
`(progn ,@body))

(defmacro with-unlocked-packages ((&rest packages) &body body)
(declare (ignorable packages))
#+(or allegro clisp cmucl)
#+(or allegro cmucl)
`(with-unlocked-packages/fallback (quote ,packages)
(lambda () ,@body))
#+ccl
`(let ((ccl:*warn-if-redefine-kernel* nil))
,@body)
#+clisp
`(ext:without-package-lock ,packages ,@body)
#+ecl
`(ext:with-unlocked-packages ,packages ,@body)
#+sb-package-locks
Expand Down
3 changes: 2 additions & 1 deletion code/packages.lisp
Expand Up @@ -7,5 +7,6 @@
#:package-locked-p
#:without-package-locks
#:with-locked-packages
#:with-unlocked-packages))
#:with-unlocked-packages
#:with-unlocked-system-packages))

0 comments on commit c2f06f3

Please sign in to comment.