Skip to content

Commit 220b343

Browse files
committed
We don't need to include pg_sema.h in s_lock.h anymore.
Minor improvement to commit daa7527: 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.
1 parent 080b7db commit 220b343

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

src/backend/storage/lmgr/spin.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
#include "miscadmin.h"
2727
#include "replication/walsender.h"
2828
#include "storage/lwlock.h"
29+
#include "storage/pg_sema.h"
2930
#include "storage/spin.h"
3031

3132

src/include/storage/s_lock.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -94,11 +94,8 @@
9494
#ifndef S_LOCK_H
9595
#define S_LOCK_H
9696

97-
#include "storage/pg_sema.h"
98-
9997
#ifdef HAVE_SPINLOCKS /* skip spinlocks if requested */
10098

101-
10299
#if defined(__GNUC__) || defined(__INTEL_COMPILER)
103100
/*************************************************************************
104101
* All the gcc inlines

src/include/storage/spin.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,9 @@
5757
#define SPIN_H
5858

5959
#include "storage/s_lock.h"
60+
#ifndef HAVE_SPINLOCKS
61+
#include "storage/pg_sema.h"
62+
#endif
6063

6164

6265
#define SpinLockInit(lock) S_INIT_LOCK(lock)

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy