Re: pthreads and standard C library calls and maybe magic Xcode switches
Re: pthreads and standard C library calls and maybe magic Xcode switches
- Subject: Re: pthreads and standard C library calls and maybe magic Xcode switches
- From: Alastair Houghton <email@hidden>
- Date: Wed, 22 Aug 2007 18:30:12 +0100
On 22 Aug 2007, at 18:09, Cem Karan wrote:
On Aug 22, 2007, at 12:45 PM, Alastair Houghton wrote:
On Wed, 22 Aug 2007 07:37:05 -0400, Cem Karan wrote:
Are you saying that the locking constructs will ensure that the
cache
is always flushed back to main memory?
No. But they will enforce strong memory ordering at those
boundaries. That is, when you take a lock, it is guaranteed that
all writes prior to that lock (will *seem* to have) completed from
the perspective of other processors in the system.
And this is the important thing for my code; I don't care if the
data is actually flushed all the way out to RAM or not, I just want
to make sure that all threads on the system see the same data.
Yes, that's usually what people want (unless they're writing device
drivers or other very low-level code, but that's a different
matter). In that case, using locks with current versions of GCC will
do what you need.
Kind regards,
Alastair.
--
http://alastairs-place.net
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden