Subject: Re: postgresql pkg & TAS
To: Andrew McMurry <a.mcmurry1@physics.oxford.ac.uk>
From: Dave Millen <webmaster@largesalad.co.uk>
List: port-arm32
Date: 04/01/1999 18:56:44
Andrew McMurry wrote:

> I have also had a fix for a while, but I was away last week. Here is a
> bit to include within the src/include/storage/s_lock.h file. Sorry
> that it isn't a proper patch. I don't have the original file to hand
> at the moment (which was already patched by the pkg system).
>
> I'll submit this to the PostgreSQL people.
>
>         Andrew
>
> -------
>
> #if defined(__arm32__)
> #define TAS(lock) tas(lock)
>
> static __inline__ int
> tas(volatile slock_t *lock)
> {
>         register slock_t _res = 1;
>
> __asm__("swpb %0, %0, [%3]": "=r"(_res), "=m"(*lock):"0"(_res), "r" (lock));
>         return (int) _res;
> }
>
> #endif   /* __arm32__ */

Hi,

The above patch appears to work fine :-) I have just compiled the package successfully
and when I ran the regression tests, all were ok except for failures on float8, datetime,
horology and random. As yet I have not tried anything other than a few simple creates,
inserts and selects, which all worked fine. I'll have to look into the regression
failures next week, unless someone knows what the cause(s) might be.

Thanks for the help,
Dave
--
Make it idiot-proof and someone will make a better idiot!

e-mail: webmaster@largesalad.co.uk
net: http://www.largesalad.co.uk/DJMsoft/