]> granicus.if.org Git - postgresql/commitdiff
We don't need to include pg_sema.h in s_lock.h anymore.
authorTom Lane <tgl@sss.pgh.pa.us>
Thu, 9 Jan 2014 01:58:22 +0000 (20:58 -0500)
committerTom Lane <tgl@sss.pgh.pa.us>
Thu, 9 Jan 2014 01:58:22 +0000 (20:58 -0500)
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.

src/backend/storage/lmgr/spin.c
src/include/storage/s_lock.h
src/include/storage/spin.h

index 3d116bc7a2e4467184939216ed0100e1e8f7d5d4..9499db115a602bc34b288a20f457f14078c5da8b 100644 (file)
@@ -26,6 +26,7 @@
 #include "miscadmin.h"
 #include "replication/walsender.h"
 #include "storage/lwlock.h"
+#include "storage/pg_sema.h"
 #include "storage/spin.h"
 
 
index 2297f772805d8d17e19e3735005b6d27cf4626fd..ba4dfe12d8617635972d427f5e4ec033930f0a5f 100644 (file)
 #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
index 2ac510db7a036931d6b24f723467fd936aaa3aa3..7ee2fedf444dc786080d3e89f20efd13c7538482 100644 (file)
@@ -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)