Re: [HACKERS] s_lock.h problem on S/Linux

From: dg(at)illustra(dot)com (David Gould)
To: emkxp01(at)mtcc(dot)demon(dot)co(dot)uk
Cc: hackers(at)postgreSQL(dot)org
Subject: Re: [HACKERS] s_lock.h problem on S/Linux
Date: 1998-06-21 01:07:27
Message-ID: 9806210107.AA05123@hawk.illustra.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)illustra(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Keith Parks 1998-06-21 15:59:04 Re: [HACKERS] s_lock.h problem on S/Linux
Previous Message Keith Parks 1998-06-20 13:06:30 s_lock.h problem on S/Linux