Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit220b343

Browse files
committed
We don't need to include pg_sema.h in s_lock.h anymore.
Minor improvement to commitdaa7527:s_lock.h no longer has any need to mention PGSemaphoreData, so we canrip out the #include that supplies that. In a non-HAVE_SPINLOCKSbuild, this doesn't really buy much since we still need the #includein spin.h --- but everywhere else, this reduces #include footprint bysome trifle, and helps keep the different locking facilities separate.
1 parent080b7db commit220b343

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
#ifndefS_LOCK_H
9595
#defineS_LOCK_H
9696

97-
#include"storage/pg_sema.h"
98-
9997
#ifdefHAVE_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
#defineSPIN_H
5858

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

6164

6265
#defineSpinLockInit(lock)S_INIT_LOCK(lock)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp