[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Gwydion & threads
- To: address@hidden
- Subject: Re: Gwydion & threads
- From: Andreas Bogk <address@hidden>
- Date: Fri, 15 Mar 2002 07:00:02 -0500
- References: <200203150958.EAA01524@life.ai.mit.edu> <87elimf65o.fsf@andreas.org>
- Sender: "Gregory T. Sullivan" <address@hidden>
- User-agent: Gnus/5.0808 (Gnus v5.8.8) XEmacs/21.4 (Common Lisp)
- Xref: traf.lcs.mit.edu comp.lang.dylan:14013
Andreas Bogk <andreas@andreas.org> writes:
> IIRC, assignments don't need to be atomic.
Ok, at least the Fun-O documentation says otherwise, and I can't find
the original threads proposal anymore.
The good news is that assignment *is* atomic, even in the presence of
a separate type pointer. This is because data and type are stored
together in a descriptor_t structure on the heap, and assignments to
variables and slots just assign the descriptor_t pointer.
Slot assignment looks like this:
L_temp_2.heapptr = tZliteral.heapptr;
L_temp_2.dataword.l = 23;
SLOT(L_bar.heapptr, descriptor_t, 4) = L_temp_2;
and variable assignment like this:
L_temp_3.heapptr = tZliteral.heapptr;
L_temp_3.dataword.l = 42;
tZtZbaz = L_temp_3;
Andreas
--
"In my eyes it is never a crime to steal knowledge. It is a good
theft. The pirate of knowledge is a good pirate."
(Michel Serres)