Re: GC and atomic getters/setters
Re: GC and atomic getters/setters
- Subject: Re: GC and atomic getters/setters
- From: Ken Ferry <email@hidden>
- Date: Sat, 17 Oct 2009 18:20:03 -0700
On Sat, Oct 17, 2009 at 5:52 PM, Kyle Sluder <email@hidden> wrote:
> On Sat, Oct 17, 2009 at 5:35 PM, Michael Ash <email@hidden>
> wrote:
> > This just leaves the writes. I assume that the GC write barrier
> > includes a memory barrier, unless someone wants to tell me otherwise.
> > If so, then there's no problem at all.
>
> Strictly speaking, this isn't really an atomicity issue, is it? What
> C assignment are you thinking of that would wind up being nonatomic?
>
The issue concerns the order of in which changes to memory are observable by
other processors.
It's not actually _that_ complicated, but there's frustratingly little clear
writing about this online.
My favorite short article is this one:
Memory Ordering in Modern Microprocessors
part 1: http://www.linuxjournal.com/article/8211
part 2: http://www.linuxjournal.com/article/8212
Though this still is missing just a liiittle bit of info that I think makes
things much clearer. Oh well.
-Ken
> --Kyle Sluder
> _______________________________________________
>
> Cocoa-dev mailing list (email@hidden)
>
> Please do not post admin requests or moderator comments to the list.
> Contact the moderators at cocoa-dev-admins(at)lists.apple.com
>
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden
>
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden