Re: [HACKERS] Current sources? - Mailing list pgsql-hackers

From Tom Ivar Helbekkmo
Subject Re: [HACKERS] Current sources?
Date
Msg-id 86zpg73ua0.fsf@barsoom.Hamartun.Priv.NO
Whole thread Raw
In response to Re: [HACKERS] Current sources?  (dg@illustra.com (David Gould))
List 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 by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: [HACKERS] Current sources?
Next
From: Tom Ivar Helbekkmo
Date:
Subject: Death on deletion attempts (was: Current sources?)