>
> Bruce Momjian wrote:
>
> > Don't break my optimizations. The locking stuff is in *.h files for a
> > reason. They get called thousands of times, and inlining this code has
> > produced a good speedup and they aren't that big.
>
> You misunderstand me. I didn't suggest removing the S_LOCK() et al
> macros. What I meant was that the actual assembly implementation of
> tas() itself might be better off in a separate source file. As an
> example, here is my current version of the locking code for the VAX,
> in s_lock.h (bbssi is "branch on bit set and set, interlocked"):
Yes, I considered static functions, but that is assuming the compiler is
going to do something, and we can't really be sure of this. Better to
make it a macro, so there is no change of it not being inlined. Also, I
don't think asm stuff is re-ordered, so you don't have the 'volatile'
problem.
--
Bruce Momjian
maillist@candle.pha.pa.us