An atomic version of define-modify-macro.
system
define-atomic-modify-macro name lambda-list function &optional doc-string => name
name⇩ |
A symbol. |
lambda-list⇩ |
A define-modify-macro lambda list. |
function⇩ |
A symbol. |
doc-string⇩ |
A string, not evaluated. |
name |
A symbol. |
The macro define-atomic-modify-macro
has the same syntax as cl:define-modify-macro, and performs a similar operation.
The resulting macro name can be used only on one of the specific set of places defined for low level atomic operations as listed in 19.13.1 Low level atomic operations. The macro name reads the value of the place, calls the function function with that value and the other arguments from lambda-list, and then writes the result of the function call if the value in place has not changed since it was first read. If that value did change, the operation is repeated until it succeeds.
Note that this means:
If doc-string is supplied then it is stored as the function documentation for name.
LispWorks® User Guide and Reference Manual - 01 Dec 2021 19:31:02