Subject: Re: Test and set (was Re: postgreSQL)
To: None <port-pmax@netbsd.org, thorpej@nas.nasa.gov>
From: Thor Lancelot Simon <tls@rek.tjls.com>
List: port-pmax
Date: 05/29/1999 01:50:49
On Fri, May 28, 1999 at 10:34:04AM -0700, Jason Thorpe wrote:
> 
> <machine/atomic.h> is the right thing, I think, since it's inherently
> machine-dependent.
> 
> Also note some of the atomic operations that arch/alpha/alpha/atomic.s
> implements...
> 
> 	- atomic test-and-set (for spin locks)
> 
> 	- atomic load-and-latch (for atomically reading a counter and
> 	  resetting it to zero, for example)
> 

And, of course, anyone wanting to use Synthesis-style data structures
might want hooks for compare-and-swap operations on processors that
have them (only the 68k?).  The idea's not totally unlike load-and-latch.

-- 
Thor Lancelot Simon	                                      tls@rek.tjls.com
	"And where do all these highways go, now that we are free?"