diff options
author | Tom Lane | 2014-01-09 01:58:22 +0000 |
---|---|---|
committer | Tom Lane | 2014-01-09 01:58:22 +0000 |
commit | 220b34331f77effdb46798ddd7cca0cffc1b2858 (patch) | |
tree | d52435a2b7771fff4b9206f26cb3b72fa817d547 | |
parent | 080b7db72ebbec22580237631d6b07d0e1147b01 (diff) |
We don't need to include pg_sema.h in s_lock.h anymore.
Minor improvement to commit daa7527afc2274432094ebe7ceb03aa41f916607:
s_lock.h no longer has any need to mention PGSemaphoreData, so we can
rip out the #include that supplies that. In a non-HAVE_SPINLOCKS
build, this doesn't really buy much since we still need the #include
in spin.h --- but everywhere else, this reduces #include footprint by
some trifle, and helps keep the different locking facilities separate.
-rw-r--r-- | src/backend/storage/lmgr/spin.c | 1 | ||||
-rw-r--r-- | src/include/storage/s_lock.h | 3 | ||||
-rw-r--r-- | src/include/storage/spin.h | 3 |
3 files changed, 4 insertions, 3 deletions
diff --git a/src/backend/storage/lmgr/spin.c b/src/backend/storage/lmgr/spin.c index 3d116bc7a2..9499db115a 100644 --- a/src/backend/storage/lmgr/spin.c +++ b/src/backend/storage/lmgr/spin.c @@ -26,6 +26,7 @@ #include "miscadmin.h" #include "replication/walsender.h" #include "storage/lwlock.h" +#include "storage/pg_sema.h" #include "storage/spin.h" diff --git a/src/include/storage/s_lock.h b/src/include/storage/s_lock.h index 2297f77280..ba4dfe12d8 100644 --- a/src/include/storage/s_lock.h +++ b/src/include/storage/s_lock.h @@ -94,11 +94,8 @@ #ifndef S_LOCK_H #define S_LOCK_H -#include "storage/pg_sema.h" - #ifdef HAVE_SPINLOCKS /* skip spinlocks if requested */ - #if defined(__GNUC__) || defined(__INTEL_COMPILER) /************************************************************************* * All the gcc inlines diff --git a/src/include/storage/spin.h b/src/include/storage/spin.h index 2ac510db7a..7ee2fedf44 100644 --- a/src/include/storage/spin.h +++ b/src/include/storage/spin.h @@ -57,6 +57,9 @@ #define SPIN_H #include "storage/s_lock.h" +#ifndef HAVE_SPINLOCKS +#include "storage/pg_sema.h" +#endif #define SpinLockInit(lock) S_INIT_LOCK(lock) |