Re: [PATCHES] Reorganization of spinlock defines - Mailing list pgsql-hackers

From Bruce Momjian
Subject Re: [PATCHES] Reorganization of spinlock defines
Date
Msg-id 200309120229.h8C2T6b11196@candle.pha.pa.us
Whole thread Raw
List pgsql-hackers
This is the email describing the changes in the patch for 7.4.

---------------------------------------------------------------------------

Bruce Momjian wrote:
> Prompted by confusion over Itanium/Opterion, I have written a patch to
> improve the way we define spinlocks for platforms and cpu's.  It
> basically decouples the OS from the CPU spinlock code.  In almost all
> cases, the spinlock code cares only about the compiler and CPU, not the
> OS.
> 
> The patch:
> 
>     o defines HAS_TEST_AND_SET inside each spinlock routine, not in
>       platform-specific files
>     o moves slock_t defines into the spinlock routines
>     o remove NEED_{CPU}_TAS_ASM define because it is no longer needed
>     o reports a compile error if spinlocks are not defined
>     o adds a configure option --without-spinlocks to allow
>       non-spinlock compiles
> 
> Looking at the patch, I realize this is how we should have done it all
> along.
> 
> It would be nice to report the lack of spinlocks in configure, rather
> than during the compile, but I can't compile s_lock.h and test for
> HAS_TEST_AND_SET until configure completes.
> 
> I plan to apply this to 7.4.

--  Bruce Momjian                        |  http://candle.pha.pa.us pgman@candle.pha.pa.us               |  (610)
359-1001+  If your life is a hard drive,     |  13 Roberts Road +  Christ can be your backup.        |  Newtown Square,
Pennsylvania19073
 


pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: [PATCHES] Reorganization of spinlock defines
Next
From: Tom Lane
Date:
Subject: Re: [PATCHES] Reorganization of spinlock defines