Re: [HACKERS] configure on linux - Mailing list pgsql-hackers

From Bruce Momjian
Subject Re: [HACKERS] configure on linux
Date
Msg-id 199802062313.SAA02347@candle.pha.pa.us
Whole thread Raw
In response to Re: [HACKERS] configure on linux  (Tom I Helbekkmo <tih@Hamartun.Priv.NO>)
List pgsql-hackers
> Oh, and Bruce: I figured out why we talked past each other about the
> lock code and inlining: I was looking at the Sparc assembly code in
> s_lock.h, since my main platform is NetBSD/sparc, and if you take a
> look at that, you'll see that it's _not_ inlined, and not pretty.  In
> fact, it breaks at -O3 and up by causing linking to fail, when GCC
> eliminates the whole tas_dummy() function, since it's static and not
> called by anything else.  I've tried to figure out how to inline it,
> but I don't know enough about the Sparc.  Besides, RISC machines were
> never meant to be programmed by anything but a computer.  :-)

I have no idea what this tas_dummy does.  On those architectures that
have tas(), we call it directly.  I think we would be better off
inlining the call, but no one has given us asm code to do it.  Now, it
would be nice if the system includes would define tas() as a macro, but
I don't know any that do.

The locking stuff gets called many, many times, and they are usually
very small routines, so the inlining is a big win for us.

>
> Anyway, this is all it takes to make things work on NetBSD/vax (note
> the _single_ instruction used to implement the test-and-set -- it's
> only one of _six_ such instructions in this powerful architecture):


--
Bruce Momjian
maillist@candle.pha.pa.us

pgsql-hackers by date:

Previous
From: Peter T Mount
Date:
Subject: Re: [QUESTIONS] LArge object functions in the backend
Next
From: "Thomas G. Lockhart"
Date:
Subject: Re: AW: [HACKERS] Re: atttypmod of 0