Author: James KanzeJames Kanze Date: May 5, 2008 06:58
On May 5, 3:09 pm, "Chris Thomasson" comcast.net> wrote:
> "Szabolcs Ferenczi" gmail.com> wrote in message
>> On May 3, 2:13 pm, Anthony Williams yahoo.com> wrote:
>>> Szabolcs Ferenczi gmail.com> writes:
>>>> On May 2, 12:43 pm, Anthony Williams yahoo.com> wrote:
>>>>> [...]
>>>>> All accesses to shared data MUST be synchronized with atomics: [...]
>>>> Can you elaborate this point please. How can you
>>>> generally synchronise N processes with help of atomics?
>>>> Do you mean only two processes under certain
>>>> circumstances?
>>> If any thread modifies shared data that is not of type
>>> atomic_xxx, the developer must ensure appropriate
>>> synchronization with any other thread that accesses that
>>> shared data in order to avoid a data race (and the
>>> undefined behaviour that comes with that).
>> It is clear that you must synchronise access to shared
>> variable. Normally you must use a Critical Region for that.
|