From dev-return-3810-apmail-apr-dev-archive=apr.apache.org@apr.apache.org Fri Aug 03 23:26:26 2001 Return-Path: Delivered-To: apmail-apr-dev-archive@apr.apache.org Received: (qmail 17141 invoked by uid 500); 3 Aug 2001 23:26:26 -0000 Mailing-List: contact dev-help@apr.apache.org; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Delivered-To: mailing list dev@apr.apache.org Received: (qmail 17130 invoked from network); 3 Aug 2001 23:26:25 -0000 X-Authentication-Warning: rdu26-58-158.nc.rr.com: trawick set sender to trawick@attglobal.net using -f Sender: trawick@rdu26-58-158.nc.rr.com To: "Roy T. Fielding" Cc: dev@apr.apache.org Subject: Re: Conditionals... References: <008901c119e7$f1071ec0$8100a8c0@godzilla> <20010731122140.A21458@ebuilt.com> <15207.5106.746348.166281@critterling.garfield.home> <15207.12731.943499.735032@critterling.garfield.home> <20010802000343.D643@ebuilt.com> <15209.31521.952343.898121@critterling.garfield.home> <20010802100837.G643@ebuilt.com> <15209.40995.720313.919910@critterling.garfield.home> <20010803121152.J4847@ebuilt.com> <20010803154350.C1122@waka.ebuilt.net> From: Jeff Trawick Date: 03 Aug 2001 19:15:14 -0400 In-Reply-To: <20010803154350.C1122@waka.ebuilt.net> Message-ID: Lines: 25 User-Agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/20.3 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Rating: h31.sny.collab.net 1.6.2 0/1000/N "Roy T. Fielding" writes: > Likewise, even a mid-update context > switch doesn't matter for a variable that is only incremented/decremented. only if the variable is used for an approximation :) x = 0 thread1 thread2 load x into reg A load x into reg A TIMESLICE increment reg A (sleeping) store reg A at x DISPATCH increment reg A store reg A at x x has been incremented twice and now has value 1 compare-and-swap can be used for this. -- Jeff Trawick | trawick@attglobal.net | PGP public key at web site: http://www.geocities.com/SiliconValley/Park/9289/ Born in Roswell... married an alien...