Re: [HACKERS] Current sources?

Поиск
Список
Период
Сортировка
От Tom Ivar Helbekkmo
Тема Re: [HACKERS] Current sources?
Дата
Msg-id 86zpg73ua0.fsf@barsoom.Hamartun.Priv.NO
обсуждение исходный текст
Ответ на Re: [HACKERS] Current sources?  (dg@illustra.com (David Gould))
Список pgsql-hackers
dg@illustra.com (David Gould) writes:

> Try making the 's_lock_test' target in
> src/backend/storage/buffer/Makefile.  It will let you be sure that
> spinlocks are working.

This is how it looks like here (NetBSD/sparc 1.3, GCC 1.7.2.2), with
the broken TAS support replaced with that from SparcLinux:

| barsoom# gmake s_lock_test
| gcc -I../../../include -I../../../backend   -I/usr/local/include -O2 -pipe  -Wall -Wmissing-prototypes -I../..
-DS_LOCK_TEST=1-g s_lock.c -o s_lock_test 
| s_lock.c: In function `main':
| s_lock.c:313: warning: implicit declaration of function `select'
| ./s_lock_test
| S_LOCK_TEST: this will hang for a few minutes and then abort
|              with a 'stuck spinlock' message if S_LOCK()
|              and TAS() are working.
|
| FATAL: s_lock(00004168) at s_lock.c:324, stuck spinlock. Aborting.
|
| FATAL: s_lock(00004168) at s_lock.c:324, stuck spinlock. Aborting.
| gmake: *** [s_lock_test] Abort trap (core dumped)
| gmake: *** Deleting file `s_lock_test'
| barsoom#

...and it did take a couple of minutes (didn't time it, though), so I
guess it works, right?

-tih
--
Popularity is the hallmark of mediocrity.  --Niles Crane, "Frasier"

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: [HACKERS] Current sources?
Следующее
От: Tom Ivar Helbekkmo
Дата:
Сообщение: Death on deletion attempts (was: Current sources?)