diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2003-12-23 22:15:07 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2003-12-23 22:15:07 +0000 |
commit | afb09b5a31a558709b7a8c577e447c60ff25ca1b (patch) | |
tree | e0d8e777f30ef07e95c94106499336437462d991 /src/backend | |
parent | cd2ad9b944fb236557bfe85999ac56857e0f22cd (diff) | |
download | postgresql-afb09b5a31a558709b7a8c577e447c60ff25ca1b.tar.gz postgresql-afb09b5a31a558709b7a8c577e447c60ff25ca1b.zip |
Use inlined TAS() on PA-RISC, if we are compiling with gcc.
Patch inspired by original submission from ViSolve.
Diffstat (limited to 'src/backend')
-rw-r--r-- | src/backend/storage/lmgr/s_lock.c | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/src/backend/storage/lmgr/s_lock.c b/src/backend/storage/lmgr/s_lock.c index e04bfaeea75..e5e372bb39d 100644 --- a/src/backend/storage/lmgr/s_lock.c +++ b/src/backend/storage/lmgr/s_lock.c @@ -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 */ |