Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 17 Dec 2000 21:13:09 -0700
From:      Chuck Paterson <cp@bsdi.com>
To:        John Polstra <TrimYourCc@polstra.com>
Cc:        smp@FreeBSD.ORG
Subject:   Re: atomic increment? 
Message-ID:  <200012180413.eBI4D9P17266@berserker.bsdi.com>
In-Reply-To: Your message of "Sun, 17 Dec 2000 15:47:35 PST." <200012172347.eBHNlZ764346@vashon.polstra.com> 

next in thread | previous in thread | raw e-mail | index | archive | help
John,


	I am pretty sure that what you said about the effects
of volatile matches my understanding of what they do. I am less
sure if we are saying the same thing about where they are needed.

	
	While the volatile can be left off of lots of operations,
it still must be left on operations which are used for locking
because there is no way the compile can no what the lock
being acquired is protecting and therefore all computations following
the operation must be done after the asm statement, discarding
is partial results that may be laying around in a register. Which
is what lead to my statement about the locked operation reducing
register pressure in the first place :)


Chuck




To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-smp" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200012180413.eBI4D9P17266>