Article View: borland.public.cppbuilder.nativeapi
Article #7562Re: Accessing same variable from multiple threads
From: Alan Bellingham
Date: Wed, 19 Jan 2005 22:15
Date: Wed, 19 Jan 2005 22:15
23 lines
2214 bytes
2214 bytes
Bob Gonder <notbg@notmindspring.invalid> wrote: >If there aren't hardware locks in place to ensure non-conflicting >atomic read/writes, then Intel is failing in it's job. Nope - because as Gambit points out, your primitive may require more than one access to read or write. At least on the x86 architecture, which doesn't insist on DWORDs being DWORD aligned. In such a case, it ain't atomic any more. My point was that I didn't think the scheduler would interrupt during the read or the write. But I'm not sure how low it goes, and whether it will interrupt during what is apparently a single CPU operation. However, if I remember my assembler, there are some instructions that go on for a potential lifetime by CPU clock cycle standards, so maybe it does. Alan Bellingham -- Me <url:mailto:alanb@episys.com> <url:http://www.doughnut.demon.co.uk/> ACCU - C, C++ and Java programming <url:http://accu.org/> The 2004 Discworld Convention <url:http://dwcon.org/>
Technical Details
Message-ID:
<qmmtu09mtj1dnckicq85cq03k9ro6aqsje@4ax.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news.glorb.com!transit.nntp.hccnet.nl!transit1.nntp.hccnet.nl!border2.nntp.ams.giganews.com!nntp.giganews.com!pe2.news.blueyonder.co.uk!blueyonder!news-peer-test!btnet!newsfeed.bt.es!caladan.landsraad.net!newsgroups.borland.com!not-for-mailReferences:
<41edea6b@newsgroups.borland.com> <41ee3727$1@newsgroups.borland.com> <41ee742e$1@newsgroups.borland.com> <41ee8f57$1@newsgroups.borland.com> <qu9tu0hgv4gqnlvv65nqq70ua4v73jv0mu@4ax.com> <ktatu01v81kub73v28uhkhp1ccrl4ct9j6@4ax.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,4809cdd9a7828fa7 X-Google-Attributes: gid10cc67,public X-Google-Language: ENGLISH,ASCII-7-bit From: Alan Bellingham <alanb@episys.com> Newsgroups: borland.public.cppbuilder.nativeapi Subject: Re: Accessing same variable from multiple threads Date: Wed, 19 Jan 2005 22:15:36 +0000 Reply-To: alanb@episys.com Message-ID: <qmmtu09mtj1dnckicq85cq03k9ro6aqsje@4ax.com> References: <41edea6b@newsgroups.borland.com> <41ee3727$1@newsgroups.borland.com> <41ee742e$1@newsgroups.borland.com> <41ee8f57$1@newsgroups.borland.com> <qu9tu0hgv4gqnlvv65nqq70ua4v73jv0mu@4ax.com> <ktatu01v81kub73v28uhkhp1ccrl4ct9j6@4ax.com> X-Newsreader: Forte Agent 2.0/32.652 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit NNTP-Posting-Host: 62.49.31.105 X-Trace: newsgroups.borland.com 1106172935 62.49.31.105 (19 Jan 2005 14:15:35 -0800) Lines: 23 Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news.glorb.com!transit.nntp.hccnet.nl!transit1.nntp.hccnet.nl!border2.nntp.ams.giganews.com!nntp.giganews.com!pe2.news.blueyonder.co.uk!blueyonder!news-peer-test!btnet!newsfeed.bt.es!caladan.landsraad.net!newsgroups.borland.com!not-for-mail