Previous: Package Lock Concepts, Up: Package Locks
Syntax:
(sb-ext:disable-package-locks symbol*)Disables package locks affecting the named symbols during compilation in the lexical scope of the declaration. Disabling locks on symbols whose home package is unlocked, or disabling an already disabled lock, has no effect.
Syntax:
(sb-ext:enable-package-locks symbol*)Re-enables package locks affecting the named symbols during compilation in the lexical scope of the declaration. Enabling locks that were not first disabled with
sb-ext:disable-package-locksdeclaration, or enabling locks that are already enabled has no effect.
Class precedence list:
package-lock-violation, package-error, error, serious-condition, condition, tSubtype of
cl:package-error. A subtype of this error is signalled when a package-lock is violated.
Class precedence list:
package-locked-error, package-lock-violation, package-error, error, serious-condition, condition, tSubtype of
sb-ext:package-lock-violation. An error of this type is signalled when an operation on a package violates a package lock.
Class precedence list:
symbol-package-locked-error, package-lock-violation, package-error, error, serious-condition, condition, tSubtype of
sb-ext:package-lock-violation. An error of this type is signalled when an operation on a symbol violates a package lock. The symbol that caused the violation is accessed by the functionsb-ext:package-locked-error-symbol.
Returns the symbol that caused the
symbol-package-locked-errorcondition.
Returns
twhenpackageis locked,nilotherwise. Signals an error ifpackagedoesn't designate a valid package.
Locks
packageand returnst. Has no effect ifpackagewas already locked. Signals an error ifpackageis not a valid package designator
Unlocks
packageand returnst. Has no effect ifpackagewas already unlocked. Signals an error ifpackageis not a valid package designator.
Returns a list containing the implementation packages of
package. Signals an error ifpackageis not a valid package designator.
Returns the packages that
packageis an implementation package of. Signals an error ifpackageis not a valid package designator.
Adds
packages-to-addas implementation packages ofpackage. Signals an error ifpackageor any of thepackages-to-addis not a valid package designator.
Removes
packages-to-removefrom the implementation packages ofpackage. Signals an error ifpackageor any of thepackages-to-removeis not a valid package designator.
Ignores all runtime package lock violations during the execution of body. Body can begin with declarations.
Unlocks
packagesfor the dynamic scope of the body. Signals an error if any ofpackagesis not a valid package designator.
Options are extended to include the following:
:lockbooleanIf the argument to
:lockist, the package is initially locked. If:lockis not provided it defaults tonil.:implementpackage-designator*The package is added as an implementation package to the packages named. If
:implementis not provided, it defaults to the package itself.Example:
(defpackage "FOO" (:export "BAR") (:lock t) (:implement)) (defpackage "FOO-INT" (:use "FOO") (:implement "FOO" "FOO-INT")) ;;; is equivalent to (defpackage "FOO") (:export "BAR")) (lock-package "FOO") (remove-implementation-package "FOO" "FOO") (defpackage "FOO-INT" (:use "BAR")) (add-implementation-package "FOO-INT" "FOO")