mirror of
https://git.postgresql.org/git/postgresql.git
synced 2024-12-21 08:29:39 +08:00
We don't need to include pg_sema.h in s_lock.h anymore.
Minor improvement to commit daa7527afc
:
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.
This commit is contained in:
parent
080b7db72e
commit
220b34331f
@ -26,6 +26,7 @@
|
|||||||
#include "miscadmin.h"
|
#include "miscadmin.h"
|
||||||
#include "replication/walsender.h"
|
#include "replication/walsender.h"
|
||||||
#include "storage/lwlock.h"
|
#include "storage/lwlock.h"
|
||||||
|
#include "storage/pg_sema.h"
|
||||||
#include "storage/spin.h"
|
#include "storage/spin.h"
|
||||||
|
|
||||||
|
|
||||||
|
@ -94,11 +94,8 @@
|
|||||||
#ifndef S_LOCK_H
|
#ifndef S_LOCK_H
|
||||||
#define S_LOCK_H
|
#define S_LOCK_H
|
||||||
|
|
||||||
#include "storage/pg_sema.h"
|
|
||||||
|
|
||||||
#ifdef HAVE_SPINLOCKS /* skip spinlocks if requested */
|
#ifdef HAVE_SPINLOCKS /* skip spinlocks if requested */
|
||||||
|
|
||||||
|
|
||||||
#if defined(__GNUC__) || defined(__INTEL_COMPILER)
|
#if defined(__GNUC__) || defined(__INTEL_COMPILER)
|
||||||
/*************************************************************************
|
/*************************************************************************
|
||||||
* All the gcc inlines
|
* All the gcc inlines
|
||||||
|
@ -57,6 +57,9 @@
|
|||||||
#define SPIN_H
|
#define SPIN_H
|
||||||
|
|
||||||
#include "storage/s_lock.h"
|
#include "storage/s_lock.h"
|
||||||
|
#ifndef HAVE_SPINLOCKS
|
||||||
|
#include "storage/pg_sema.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#define SpinLockInit(lock) S_INIT_LOCK(lock)
|
#define SpinLockInit(lock) S_INIT_LOCK(lock)
|
||||||
|
Loading…
Reference in New Issue
Block a user