Macro | Package: excl | ToC | DocOverview | CGDoc | RelNotes | FAQ | Index | PermutedIndex
| Allegro CL version 9.0 Moderate update since 9.0 release. 8.2 version

## incf-atomic

Arguments: place &optional (increment-form 1)

This macro acts like incf with the same arguments except that the update is atomic with respect to any other processes looking at the same place. That is, if several processes simultaneously try to incf-atomic (or decf-atomic) the same location, all operations occur sequentially in some unspecified order. As a result, the final value will be what is expected. (If you just used incf's and decf's, the first incf could read the value and while it is calculating the increment, another incf could run, and then the initial incf could store its result effectively cancelling the action of the second incf.)

Note on the place argument: not all places legal as the first argument of setf can be used as the place argument to this macro. The list of allowable places can be found in Atomic read-modify-write primitives in smp.htm.

See smp.htm and multiprocessing.htm for more information on this macro and on multiprocessing.

Copyright (c) 1998-2019, Franz Inc. Oakland, CA., USA. All rights reserved.
This page was not revised from the 8.2 page.
Created 2012.5.30.

|  | ToC | DocOverview | CGDoc | RelNotes | FAQ | Index | PermutedIndex
| Allegro CL version 9.0 Moderate update since 9.0 release. 8.2 version