From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-0.9 required=5.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,e0e1d3b3f7c994b8 X-Google-Attributes: gid103376,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!postnews.google.com!m3g2000hsc.googlegroups.com!not-for-mail From: Maciej Sobczak Newsgroups: comp.lang.ada Subject: Re: Robert Dewar's great article about the Strengths of Ada over other langauges in multiprocessing! Date: Wed, 12 Mar 2008 06:33:37 -0700 (PDT) Organization: http://groups.google.com Message-ID: References: <13t4b2kkjem20f3@corp.supernews.com> <89af8399-94fb-42b3-909d-edf3c98d32e5@n75g2000hsh.googlegroups.com> <47D39DC8.20002@obry.net> <114f711c-9cf8-4fdb-8f11-77667afb8719@c33g2000hsd.googlegroups.com> NNTP-Posting-Host: 128.141.45.252 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Trace: posting.google.com 1205328818 12627 127.0.0.1 (12 Mar 2008 13:33:38 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Wed, 12 Mar 2008 13:33:38 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: m3g2000hsc.googlegroups.com; posting-host=128.141.45.252; posting-account=bMuEOQoAAACUUr_ghL3RBIi5neBZ5w_S User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X; en-US; rv:1.8.1.12) Gecko/20080201 Firefox/2.0.0.12,gzip(gfe),gzip(gfe) Xref: g2news1.google.com comp.lang.ada:20309 Date: 2008-03-12T06:33:37-07:00 List-Id: On 12 Mar, 01:32, gp...@axonx.com wrote: > VTab is virtual call table, created when class has at least one > virtual function. That will make it similar to tagged record. > Otherwise it will be similar to a plain Ada record and destructor may > be inlined. In C++ destructor can be inlined *always*, unless the object is deleted via pointer to base. In other words, objects with automatic or static storage duration (local, static and global) objects can have inlined destructors - no matter whether it is virtual or not. > With C++ to be totally multicore thread safe, you need to make > "volatile" all the data that has any possibility to be accessed from > different threads. Absolutely incorrect. In C and C++ "volatile" has nothing to do with threads. It is neither necessary nor sufficient. > Otherwise, you may get incorrect readings once in a while. "volatile" does not prevent it. > Few years > back I spent months chasing these misreadings when moved heavily > mullti-threded app to multi-core. You still have some months of chasing ahead. :-) Start with removing all "volatile" keywords from your code. Then make it right. -- Maciej Sobczak * www.msobczak.com * www.inspirel.com