Re: [PATCHES] Reorganization of spinlock defines

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: [PATCHES] Reorganization of spinlock defines
Дата
Msg-id 11722.1063381111@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: [PATCHES] Reorganization of spinlock defines  (Bruce Momjian <pgman@candle.pha.pa.us>)
Ответы Re: [PATCHES] Reorganization of spinlock defines  (Bruce Momjian <pgman@candle.pha.pa.us>)
Список 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 по дате отправления:

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: massive quotes?
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: [PATCHES] Reorganization of spinlock defines