Damien Neil <[EMAIL PROTECTED]> wrote:
> On Thu, Jan 15, 2004 at 09:31:39AM +0100, Leopold Toetsch wrote:
>> I don't see any advantage of such a model. The more as it doesn't
>> gurantee any atomic access to e.g. long or doubles. The atomic access to
>> ints and pointers seems to rely on the architecture but is of course
>> reasonable.

> You *can't* guarantee atomic access to longs and doubles on some
> architectures, unless you wrap every read or write to one with a
> lock.  The CPU support isn't there.

Yes, that's what I'm saying. I don't see an advantage of JVMs multi-step
variable access, because it even doesn't provide such atomic access.

Parrot deals with PMCs, which can contain (lets consider scalars only)
e.g. a PerlInt or a PerlNumer. Now we would have atomic access
(normally) to the former and very likely non-atomic access to the latter
just depending on the value which happened to be stored in the PMC.

This implies, that we have to wrap almost[1] all shared write *and* read
PMC access with LOCK/UNLOCK.

[1] except plain ints and pointers on current platforms

>                        - Damien

leo

Reply via email to