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

From Tom Lane
Subject Re: [PATCHES] Reorganization of spinlock defines
Date
Msg-id 11722.1063381111@sss.pgh.pa.us
Whole thread Raw
In response to Re: [PATCHES] Reorganization of spinlock defines  (Bruce Momjian <pgman@candle.pha.pa.us>)
Responses Re: [PATCHES] Reorganization of spinlock defines  (Bruce Momjian <pgman@candle.pha.pa.us>)
List pgsql-hackers
Bruce Momjian <pgman@candle.pha.pa.us> writes:
> Does this say that Darwin on something other than PPC doesn't have
> spinlocks?  Is that going to hit a spinlock define, or fall through?

It says that darwin.h is broken, and always has been, for non-PPC
builds.  Since there is no non-PPC Darwin (afaik), this is cosmetic.
Keep in mind that the argument here is exactly over whether we should
be fixing cosmetic issues right now.

> Also, look at NEED_I386_TAS_ASM:  It is used only by SCO compilers,
> though it is defined for all Intel platforms.  The s_lock.h gcc test
> already tests __i386__.  It really doesn't do anything on non-SCO
> compilers, and non-SCO compilers are better testing for i386 anyway.

<shrug>  Again, we were asking you what it would take to fix
Opteron/Itanium.  Not to clean up cosmetic issues that have never caused
any problem before.

> Let me also add that some slock_t typedef's didn't match the assembly
> code.  For example, __alpha_ on netbsd.h had slock_t defined as
> "unsigned long", while in linux.h it was "long int".  I assumed the
> alpha was the correct one, but clearly they should be the same because
> they use the same assembly code.

As long as it's the right width, whether the code thinks it's signed or
not isn't gonna matter.  We don't do any comparisons on spinlocks,
except maybe zero/notzero.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: massive quotes?
Next
From: Bruce Momjian
Date:
Subject: Re: [PATCHES] Reorganization of spinlock defines