Article View: bit.listserv.asm370
Article #1553Re: Strange use of compare-and-swap
From: Alasdair Grant
Date: Fri, 26 Jun 1992 09:27
Date: Fri, 26 Jun 1992 09:27
14 lines
1347 bytes
1347 bytes
Interesting. I have received several responses to this both on the net and by mail, and some say that CS is necessary, and some say it isn't. My reading of POP is that CS is not necessary when storing a fixed value into a fullword, as Brian Eliot points out, _even if another task modifies COUNTER between the L 1,COUNTER and the CS 1,0,COUNTER_. It will just cause the loop to be gone through again. I guess it goes to show that lots of other people misunderstand CS as well as the author of this program. (The reason for not "leaving it alone" is that zeroing a word by CS is actually quite expensive, btw.) Thanks for your comments. -- Alasdair.Grant@ucs.cam.ac.uk Systems Development (networks), Cambridge U.
Technical Details
Message-ID:
<1992Jun26.092746.6844@cl.cam.ac.uk>Path:
arc1-ca.pugleaf.net!sparky!uunet!mcsun!uknet!cam-cl!cl.cam.ac.uk!ag129References:
<2950635@RPITSMTS.BITNET>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fcdcb,97471b04c882180b X-Google-Attributes: gidfcdcb,public X-Google-ArrivalTime: 1992-06-25 22:15:24 PST Path: arc1-ca.pugleaf.net!sparky!uunet!mcsun!uknet!cam-cl!cl.cam.ac.uk!ag129 From: ag129@cl.cam.ac.uk (Alasdair Grant) Newsgroups: bit.listserv.asm370 Subject: Re: Strange use of compare-and-swap Message-ID: <1992Jun26.092746.6844@cl.cam.ac.uk> Date: 26 Jun 92 09:27:46 GMT References: <2950635@RPITSMTS.BITNET> Sender: news@cl.cam.ac.uk (The news facility) Reply-To: ag129@cl.cam.ac.uk (Alasdair Grant) Organization: U of Cambridge Comp Lab, UK Lines: 14