Boost logo

Boost Users :

Subject: Re: [Boost-users] [Thread] How to invoke a memory fence?
From: Zeljko Vrba (zvrba_at_[hidden])
Date: 2009-01-28 01:38:15


On Tue, Jan 27, 2009 at 01:55:31PM -0800, Radosavljevic, Branko wrote:
>
> but I'd rather not. I assume that if I want to use Boost.Thread,
> I'll need to use a mutex, but I don't see any discussion
> of memory fence issues in the documentation.
>
POSIX mutexes gurantee that proper fences will be applied at the right spots.
My guess is that the same holds also on Windows, but you should check with
the documentation. (If you're using x86/x64, all atomic instructions are also
acquire/release fences.)


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net