Subject: Re: PostGres test-and-set [was Re: daily CVS update output]
To: Jonathan Stone <jonathan@DSG.Stanford.EDU>
From: Colin Wood <>
List: current-users
Date: 02/18/1998 18:24:37
Jonathan Stone wrote:
> I wrote:
> [Tom I Helbekkmo <tih@Hamartun.Priv.NO> wrote]
> >>Most
> >>other NetBSD platforms will be very, very easy to get running for
> >>someone who is able to implement a simple test-and-set spin lock for
> >>the hardware in question in assembly.
> >But what about processors that cant do test-and-set?  Should we
> >introduce a new MD syscall or fastpath trap for them, or what?
> Sigh. It'd be nice if PostGres was designed to better support broken
> CPUs, but one cant be too disappointed that they dont.

PostGreSQL does support machines without a test-and-set instruction, but
it requires some strange software locking scheme.  It's been a while since
I looked at the code, but I believe that it does work.  It's just slower
than having an atomic instruction in hardware.


Colin Wood                       
Component Design Engineer - MD6                 Intel Corporation
I speak only on my own behalf, not for my employer.