🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.nativeapi
Article #7566

Re: Accessing same variable from multiple threads

#7566
From: Bob Gonder
Date: Thu, 20 Jan 2005 03:58
17 lines
1971 bytes
Alan Bellingham wrote:

>Isn't there a REP instruction that continues until CS or something
>reaches zero?

Yes, cx or ecx, but it repeatedly executes the same instruction, which
is different from what you are thinking.

	REP	STOSB
is the equiv of
	while( ECX-- ) *(BYTE*)(EDI++) = AL;

The instruction is "complete" (all regeisters are updated, everything
is in a known state, ready for the next iteration) after _each_
iteration. In the above, ecx and edi and the memory have been updated
by the time it gets to the ; at which point it is stable, and
available for interrupts before looping for another go.
Technical Details
Message-ID: <e1auu01p1rc79m298c2hpb4h42nk5i70u2@4ax.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!proxad.net!proxad.net!194.117.148.138.MISMATCH!pe2.news.blueyonder.co.uk!blueyonder!news-peer-test!btnet!newsfeed.bt.es!caladan.landsraad.net!newsgroups.borland.com!not-for-mail
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> <qmmtu09mtj1dnckicq85cq03k9ro6aqsje@4ax.com> <ddotu0t652i1q3a5ulnnt0c78ocr25vuae@4ax.com> <5a0uu015uqqt50bu5knqa704tkhkmuebia@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: Bob Gonder <notbg@notmindspring.invalid>
Newsgroups: borland.public.cppbuilder.nativeapi
Subject: Re: Accessing same variable from multiple threads
Date: Wed, 19 Jan 2005 19:58:41 -0800
Organization: MindSpring Enterprises, Inc.
Reply-To: notbg@notmindspring.invalid
Message-ID: <e1auu01p1rc79m298c2hpb4h42nk5i70u2@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> <qmmtu09mtj1dnckicq85cq03k9ro6aqsje@4ax.com> <ddotu0t652i1q3a5ulnnt0c78ocr25vuae@4ax.com> <5a0uu015uqqt50bu5knqa704tkhkmuebia@4ax.com>
X-Newsreader: Forte Agent 1.93/32.576 English (American)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 69.69.91.123
X-Trace: newsgroups.borland.com 1106193517 69.69.91.123 (19 Jan 2005 19:58:37 -0800)
Lines: 19
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!proxad.net!proxad.net!194.117.148.138.MISMATCH!pe2.news.blueyonder.co.uk!blueyonder!news-peer-test!btnet!newsfeed.bt.es!caladan.landsraad.net!newsgroups.borland.com!not-for-mail