1
0
mirror of https://github.com/postgres/postgres.git synced 2025-09-05 02:22:28 +03:00

Use inlined TAS() on PA-RISC, if we are compiling with gcc.

Patch inspired by original submission from ViSolve.
This commit is contained in:
Tom Lane
2003-12-23 22:15:07 +00:00
parent cd2ad9b944
commit afb09b5a31
3 changed files with 50 additions and 16 deletions

View File

@@ -9,7 +9,7 @@
*
*
* IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/storage/lmgr/s_lock.c,v 1.21 2003/12/23 18:13:17 tgl Exp $
* $PostgreSQL: pgsql/src/backend/storage/lmgr/s_lock.c,v 1.22 2003/12/23 22:15:07 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -124,8 +124,12 @@ s_lock(volatile slock_t *lock, const char *file, int line)
*/
#ifdef HAVE_SPINLOCKS /* skip spinlocks if requested */
#if defined(__GNUC__)
/*************************************************************************
/*
* All the gcc flavors that are not inlined
*/
@@ -151,6 +155,7 @@ _success: \n\
}
#endif /* __m68k__ */
#if defined(__mips__) && !defined(__sgi)
static void
tas_dummy()
@@ -178,13 +183,14 @@ fail: \n\
}
#endif /* __mips__ && !__sgi */
#else /* not __GNUC__ */
/***************************************************************************
/*
* All non gcc
*/
#if defined(sun3)
static void
tas_dummy() /* really means: extern int tas(slock_t
@@ -210,7 +216,6 @@ tas_dummy() /* really means: extern int tas(slock_t
#endif /* sun3 */
#if defined(__sparc__) || defined(__sparc)
/*
* sparc machines not using gcc
@@ -233,10 +238,9 @@ tas_dummy() /* really means: extern int tas(slock_t
#endif /* __sparc || __sparc__ */
#endif /* not __GNUC__ */
#endif /* HAVE_SPINLOCKS */