Re: [HACKERS] s_lock.h problem on S/Linux - Mailing list pgsql-hackers

From dg@illustra.com (David Gould)
Subject Re: [HACKERS] s_lock.h problem on S/Linux
Date
Msg-id 9806210107.AA05123@hawk.illustra.com
Whole thread Raw
In response to s_lock.h problem on S/Linux  (Keith Parks <emkxp01@mtcc.demon.co.uk>)
Responses Re: [HACKERS] s_lock.h problem on S/Linux  (Bruce Momjian <maillist@candle.pha.pa.us>)
List pgsql-hackers
>
> Hi hackers.
>
> I am having problems with the new spinlock code on the SPARC linux
> platform. (Latest CVSup)
>
> The compiler doesn't seem to like the "asm" part of s_lock.h for (sparc)
>
> Here's one of the compiles that fails.

Thank you for testing and reporting this. It is my fault of course, but as
I don't have access to a sparc for testing I just did what I could. I am
guessing here, but please apply the following to your pgsql and let me know
what happens. Also, cd to src/storage/buffer and do 'make s_lock_test' as
well.


*** src/include/storage/s_lock.h.orig    Sun Jun 14 19:37:47 1998
--- src/include/storage/s_lock.h    Sat Jun 20 18:01:13 1998
***************
*** 130,136 ****

      __asm__("ldstub [%1], %0" \
              : "=r"(_res), "=m"(*lock) \
!             : "1"(lock));
      return (int) _res;
  }
  #endif /* sparc */
--- 130,136 ----

      __asm__("ldstub [%1], %0" \
              : "=r"(_res), "=m"(*lock) \
!             : "0"(_res));
      return (int) _res;
  }
  #endif /* sparc */

-dg

David Gould            dg@illustra.com           510.628.3783 or 510.305.9468
Informix Software  (No, really)         300 Lakeside Drive  Oakland, CA 94612
"Don't worry about people stealing your ideas.  If your ideas are any
 good, you'll have to ram them down people's throats." -- Howard Aiken

pgsql-hackers by date:

Previous
From: Keith Parks
Date:
Subject: s_lock.h problem on S/Linux
Next
From: Keith Parks
Date:
Subject: Re: [HACKERS] s_lock.h problem on S/Linux