[Openmcl-devel] Is setf atomic?

Gary Byers gb at clozure.com
Tue Nov 6 17:42:26 UTC 2007


If you're asking whether global variables and property lists are
potentially shared resources just like everything else or whether
they have some sort of magic dispensation ... well, there isn't
any magic dispensation.

There are certainly lots of low-level internal things in OpenMCL that
do atomic read-modify-write operations that're guaranteed (by the
hardware) to either succeed or detectably fail.  It's generally hard
to map things like SETF (whose specified behavior is about as far from
"atomic update" as one could imagine) onto these primitives, and it's
not clear that that'd be desirable: such an atomic operation is likely
to be an order of magnitude slower than a non-atomic operation in terms
of direct costs, and may have all kinds of indirect costs (serialization
on an machine that does out-of-order memory operations and/or execution.)


On Tue, 6 Nov 2007, Pascal Costanza wrote:

> Hi,
>
> Are a setf on a simple variable, and a setf on a property list (i.e.,
> a (setf getf)), thread-safe (atomic) operations in OpenMCL?
>
>
> Thanks,
> Pascal
>
> -- 
> Pascal Costanza, mailto:pc at p-cos.net, http://p-cos.net
> Vrije Universiteit Brussel, Programming Technology Lab
> Pleinlaan 2, B-1050 Brussel, Belgium
>
>
>
>
> _______________________________________________
> Openmcl-devel mailing list
> Openmcl-devel at clozure.com
> http://clozure.com/mailman/listinfo/openmcl-devel
>
>



More information about the Openmcl-devel mailing list