From boo at terekhov.de Wed Sep 15 14:11:40 2004 From: boo at terekhov.de (Alexander Terekhov) Date: Wed, 15 Sep 2004 16:11:40 +0200 Subject: Memory model for multithreaded C++ Message-ID: <41484D9C.6BAA2770@terekhov.de> < Forward Quoted > ----- From: Ben Hutchings Newsgroups: comp.lang.c++.moderated Subject: Re: Multithreaded programming: is the C++ standardization committee listening? Date: 15 Sep 2004 05:57:02 -0400 Message-ID: References: ... <41475a8c at andromeda.datanet.hu> ----- Ben Hutchings wrote: > > Balog Pal wrote: > > "Joe Seigh" wrote in message > > news:41463A59.ABB040BD at xemaps.com... > > > >> Formal definitions of the memory model were rejected as > >> unreadable by the vast majority of programmers. > > > > DOH > > > >> I could do a formal specification but I'm not really in a position > >> of any kind of authority so there's no point in my doing it, even > >> as an academic exercise. > > > > Of course there is. C++ needs that formal spec. The to-be-assembled > > proposal on thread support must have it. (Hopefully the first move happens > > at the recent meeting.) > > The first paper, entitled "Memory model for multithreaded C++", has > been submitted as N1680. > > > For a while it may be just a TODO spot, but the sooner it is ready > > the better. > > This first paper simply explains why the memory model needs to be > redefined for multithreaded environments and what sort of special > operations may be needed. > > > If you can do it please do, it will not be a wasted work. > > It might be if it's duplicated work. That's not meant to discourage > anyone from working on the memory model; just to point out that people > with experience are already doing so (Doug Lea and Bill Bugh were co- > authors on both JSR 133 and this paper) and it might be a good idea to > work with them than separately. > > -- > Ben Hutchings > If at first you don't succeed, you're doing about average. > > [ See http://www.gotw.ca/resources/clcm.htm for info about ] > [ comp.lang.c++.moderated. First time posters: Do this! ] regards, alexander. From boo at terekhov.de Fri Sep 17 13:24:03 2004 From: boo at terekhov.de (Alexander Terekhov) Date: Fri, 17 Sep 2004 15:24:03 +0200 Subject: [c++-pthreads] Memory model for multithreaded C++ References: <41484D9C.6BAA2770@terekhov.de> Message-ID: <414AE573.7A926A03@terekhov.de> < Forward Inline > -------- Original Message -------- Newsgroups: comp.programming.threads Subject: Re: C++ support for threads Date: Fri, 17 Sep 2004 15:13:00 +0200 Message-ID: <414AE2DC.11DD838 at web.de> References: <414ADC33.874AAFFE at xemaps.com> Joe Seigh wrote: > > It looks like there is some movement to support threads in C++ according > to this link from a discussion on it in c.l.c++.m. > > http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2004/n1680.pdf They better stay out of volatile mess. atomic<> "intrinsic" is the way to go. There's no need to "revise" C/C++ volatiles. Java's volatiles imply more constraints than acquire-on-read and release- on-write. BTW, Dinkum is pushing Boost.Thread (like) interface: http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2004/n1682.html They better first incorporate pthread.h as ... http://groups.google.com/groups?selm=412533CA.82703A04%40web.de is the next step. regards, alexander.