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

Bruce Momjian <maillist@candle.pha.pa.us>

From: Bruce Momjian <maillist@candle.pha.pa.us>
To: dg@illustra.com (David Gould)
Cc: emkxp01@mtcc.demon.co.uk, hackers@postgreSQL.org
Date: 1998-07-18T14:37:39Z
Lists: pgsql-hackers
Patch applied.

> > 
> > 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
> 
> 


-- 
Bruce Momjian                          |  830 Blythe Avenue
maillist@candle.pha.pa.us              |  Drexel Hill, Pennsylvania 19026
  +  If your life is a hard drive,     |  (610) 353-9879(w)
  +  Christ can be your backup.        |  (610) 853-3000(h)