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-locks
declaration, or enabling locks that are already enabled has no effect.
Class precedence list:
package-lock-violation, package-error, error, serious-condition, condition, t
Subtype 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, t
Subtype 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, t
Subtype 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-error
condition.
Returns
t
whenpackage
is locked,nil
otherwise. Signals an error ifpackage
doesn't designate a valid package.
Locks
package
and returnst
. Has no effect ifpackage
was already locked. Signals an error ifpackage
is not a valid package designator
Unlocks
package
and returnst
. Has no effect ifpackage
was already unlocked. Signals an error ifpackage
is not a valid package designator.
Returns a list containing the implementation packages of
package
. Signals an error ifpackage
is not a valid package designator.
Returns the packages that
package
is an implementation package of. Signals an error ifpackage
is not a valid package designator.
Adds
packages-to-add
as implementation packages ofpackage
. Signals an error ifpackage
or any of thepackages-to-add
is not a valid package designator.
Removes
packages-to-remove
from the implementation packages ofpackage
. Signals an error ifpackage
or any of thepackages-to-remove
is not a valid package designator.
Ignores all runtime package lock violations during the execution of body. Body can begin with declarations.
Unlocks
packages
for the dynamic scope of the body. Signals an error if any ofpackages
is not a valid package designator.
Options are extended to include the following:
:lock
booleanIf the argument to
:lock
ist
, the package is initially locked. If:lock
is not provided it defaults tonil
.:implement
package-designator*The package is added as an implementation package to the packages named. If
:implement
is 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")