Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.programming.threads > #569
| From | Alexander Terekhov <terekhov@web.de> |
|---|---|
| Newsgroups | comp.programming.threads |
| Subject | Re: Thread safe logging (or protecting global variables) |
| Date | 2011-09-15 13:12 +0200 |
| Organization | A noiseless patient Spider |
| Message-ID | <4E71DD9B.BC356E9@web.de> (permalink) |
| References | (7 earlier) <28d00de6-ff3f-429c-acea-62646656400f@r8g2000prd.googlegroups.com> <4E708D45.C98CF9DF@web.de> <17b0441f-0a8c-4c53-97e6-90e79cb7888d@z26g2000pre.googlegroups.com> <j4rnb5$ghe$1@speranza.aioe.org> <e9bfc484-4e03-4004-ace8-9b4d954219de@l2g2000vbn.googlegroups.com> |
Joshua Maurice wrote: > > On Sep 14, 7:19 pm, "James" <n...@spam.invalid> wrote: > > "Joshua Maurice" <joshuamaur...@gmail.com> wrote in message > > > > news:17b0441f-0a8c-4c53-97e6-90e79cb7888d@z26g2000pre.googlegroups.com... > > > > [...] > > > > > First is that "InterlockedIncrement" probably does not provide memory > > > order guarantees, probably just like C++11 std::memory_order_relaxed. > > > > http://msdn.microsoft.com/en-us/library/ms683614(v=vs.85).aspx > > > > How do you explain the following quote: > > > > "This function generates a full memory barrier (or fence) to ensure that > > memory operations are completed in order." > > > > ? > > I explain it through my complete inability to read. > > So, do the interlocked functions act as a full barrier? As that's ill > defined without context, do they act at least as strong as a C++11 > std::memory_order_acq_rel memory operation? > > Is that Boost mailing list "post" authoritative? It raised some good > points, but the lack of proper punctuation makes me question it. To What do you mean by "authoritative"? ;-) Back in 2001 I was typing so fast that proper punctuation was just a hindrance. > quite, "also, Interlocked stuff does not formally provide memory synch > guaranties". The above msdn citation is about as formal as you get for > win32 AFAIK. I merely assumed it'd work as documented. Anyone actually > know if it doesn't? IIRC back in 2001 MS docs said absolutely nothing about memory fencing for interlocked stuff. Saying that "this function generates a full memory barrier (or fence) to ensure that memory operations are completed in order" isn't really helpful either because in the context of relaxed memory models a fully fenced RMW needs more than one fence. regards, alexander.
Back to comp.programming.threads | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Thread safe logging (or protecting global variables) Jef Driesen <jefdriesen@hotmail.com.invalid> - 2011-09-05 20:19 +0200
Re: Thread safe logging (or protecting global variables) Edek <edek.pienkowski@gmail.com> - 2011-09-05 20:30 +0200
Re: Thread safe logging (or protecting global variables) Jef Driesen <jefdriesen@hotmail.com.invalid> - 2011-09-06 18:48 +0200
Re: Thread safe logging (or protecting global variables) Edek <edek.pienkowski@gmail.com> - 2011-09-07 10:34 +0200
Re: Thread safe logging (or protecting global variables) Jef Driesen <jefdriesen@hotmail.com.invalid> - 2011-09-08 22:00 +0200
Re: Thread safe logging (or protecting global variables) Edek <edek.pienkowski@gmail.com> - 2011-09-09 18:13 +0200
Re: Thread safe logging (or protecting global variables) Jef Driesen <jefdriesen@hotmail.com.invalid> - 2011-09-13 17:58 +0200
Re: Thread safe logging (or protecting global variables) Joshua Maurice <joshuamaurice@gmail.com> - 2011-09-13 13:18 -0700
Re: Thread safe logging (or protecting global variables) Jef Driesen <jefdriesen@hotmail.com.invalid> - 2011-09-14 07:16 +0200
Re: Thread safe logging (or protecting global variables) Joshua Maurice <joshuamaurice@gmail.com> - 2011-09-14 13:18 -0700
Re: Thread safe logging (or protecting global variables) Edek <edek.pienkowski@gmail.com> - 2011-09-14 09:33 +0200
Re: Thread safe logging (or protecting global variables) Alexander Terekhov <terekhov@web.de> - 2011-09-14 13:17 +0200
Re: Thread safe logging (or protecting global variables) Joshua Maurice <joshuamaurice@gmail.com> - 2011-09-14 13:03 -0700
Re: Thread safe logging (or protecting global variables) Joshua Maurice <joshuamaurice@gmail.com> - 2011-09-14 13:19 -0700
Re: Thread safe logging (or protecting global variables) "James" <no@spam.invalid> - 2011-09-14 19:19 -0700
Re: Thread safe logging (or protecting global variables) Joshua Maurice <joshuamaurice@gmail.com> - 2011-09-14 21:03 -0700
Re: Thread safe logging (or protecting global variables) Alexander Terekhov <terekhov@web.de> - 2011-09-15 13:12 +0200
Re: Thread safe logging (or protecting global variables) Joshua Maurice <joshuamaurice@gmail.com> - 2011-09-15 12:24 -0700
Re: Thread safe logging (or protecting global variables) Alexander Terekhov <terekhov@web.de> - 2011-09-15 22:22 +0200
Re: Thread safe logging (or protecting global variables) "James" <no@spam.invalid> - 2011-09-15 13:33 -0700
Re: Thread safe logging (or protecting global variables) Joshua Maurice <joshuamaurice@gmail.com> - 2011-09-15 15:36 -0700
Re: Thread safe logging (or protecting global variables) Joshua Maurice <joshuamaurice@gmail.com> - 2011-09-15 15:36 -0700
Re: Thread safe logging (or protecting global variables) Alexander Terekhov <terekhov@web.de> - 2011-09-16 16:28 +0200
Re: Thread safe logging (or protecting global variables) Joshua Maurice <joshuamaurice@gmail.com> - 2011-09-16 15:06 -0700
Re: Thread safe logging (or protecting global variables) Alexander Terekhov <terekhov@web.de> - 2011-09-17 12:50 +0200
Re: Thread safe logging (or protecting global variables) Alexander Terekhov <terekhov@web.de> - 2011-09-15 12:50 +0200
Re: Thread safe logging (or protecting global variables) Edek <edek.pienkowski@gmail.com> - 2011-09-14 09:17 +0200
Re: Thread safe logging (or protecting global variables) Joshua Maurice <joshuamaurice@gmail.com> - 2011-09-08 16:28 -0700
Re: Thread safe logging (or protecting global variables) Joshua Maurice <joshuamaurice@gmail.com> - 2011-09-08 16:33 -0700
Re: Thread safe logging (or protecting global variables) Joshua Maurice <joshuamaurice@gmail.com> - 2011-09-08 20:55 -0700
Re: Thread safe logging (or protecting global variables) Joshua Maurice <joshuamaurice@gmail.com> - 2011-09-12 00:45 -0700
csiph-web