diff options
| author | Tom Lane | 2003-12-23 18:13:17 +0000 |
|---|---|---|
| committer | Tom Lane | 2003-12-23 18:13:17 +0000 |
| commit | 9adaf64da343f84ca4659e6ff9be926daf628a43 (patch) | |
| tree | efe2c94a8912a581c97b0017e74f1ffc5b689631 /src/backend | |
| parent | caf6e9d2dd072299fa7779446f0dcc31e1f80c2d (diff) | |
Mop-up for HAS_TEST_AND_SET refactoring. Un-break two or three platforms
that were broken, try to make layout of s_lock.h entries consistent,
use HAVE_SPINLOCKS in preference to HAS_TEST_AND_SET everywhere outside
s_lock.h itself.
Diffstat (limited to 'src/backend')
| -rw-r--r-- | src/backend/storage/lmgr/s_lock.c | 7 | ||||
| -rw-r--r-- | src/backend/storage/lmgr/spin.c | 9 |
2 files changed, 8 insertions, 8 deletions
diff --git a/src/backend/storage/lmgr/s_lock.c b/src/backend/storage/lmgr/s_lock.c index 3f13baaa60e..e04bfaeea75 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.20 2003/12/23 03:31:30 momjian Exp $ + * $PostgreSQL: pgsql/src/backend/storage/lmgr/s_lock.c,v 1.21 2003/12/23 18:13:17 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -17,6 +17,7 @@ #include <sys/time.h> #include <unistd.h> + #include "storage/s_lock.h" @@ -118,8 +119,8 @@ s_lock(volatile slock_t *lock, const char *file, int line) * definition exists (yet). * In the future, get rid of tas.[cso] and fold it into this file. * - * If you change something here, you have to modify s_lock.h because - * the definitions for these is split between this file and s_lock.h. + * If you change something here, you will likely need to modify s_lock.h too, + * because the definitions for these are split between this file and s_lock.h. */ diff --git a/src/backend/storage/lmgr/spin.c b/src/backend/storage/lmgr/spin.c index 62bb4f4ad3e..ff99d4de1e7 100644 --- a/src/backend/storage/lmgr/spin.c +++ b/src/backend/storage/lmgr/spin.c @@ -16,7 +16,7 @@ * * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/storage/lmgr/spin.c,v 1.13 2003/12/23 03:31:30 momjian Exp $ + * $PostgreSQL: pgsql/src/backend/storage/lmgr/spin.c,v 1.14 2003/12/23 18:13:17 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -25,10 +25,9 @@ #include "storage/lwlock.h" #include "storage/pg_sema.h" #include "storage/spin.h" -#include "storage/s_lock.h" -#ifdef HAS_TEST_AND_SET +#ifdef HAVE_SPINLOCKS /* * Report number of semaphores needed to support spinlocks. @@ -39,7 +38,7 @@ SpinlockSemas(void) return 0; } -#else /* !HAS_TEST_AND_SET */ +#else /* !HAVE_SPINLOCKS */ /* * No TAS, so spinlocks are implemented as PGSemaphores. @@ -93,4 +92,4 @@ tas_sema(volatile slock_t *lock) return !PGSemaphoreTryLock((PGSemaphore) lock); } -#endif /* !HAS_TEST_AND_SET */ +#endif /* !HAVE_SPINLOCKS */ |
