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

Commit9c4b55d

Browse files
committed
Declare lwlock.c's LWLockAcquireCommon() as a static inline.
68a2e52 has introduced LWLockAcquireCommon() containing theprevious contents of LWLockAcquire() plus added functionality. Thelatter then calls it, just like LWLockAcquireWithVar(). Because themajority of callers don't need the added functionality, declare thecommon code as inline. The compiler then can optimize away the unusedcode. Doing so is also useful when looking at profiles, todifferentiate the users.Backpatch to 9.4, the first branch to contain LWLockAcquireCommon().
1 parent5c1faa7 commit9c4b55d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

‎src/backend/storage/lmgr/lwlock.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,8 @@ static LWLock *held_lwlocks[MAX_SIMUL_LWLOCKS];
8585
staticintlock_addin_request=0;
8686
staticboollock_addin_request_allowed= true;
8787

88-
staticboolLWLockAcquireCommon(LWLock*l,LWLockModemode,uint64*valptr,
89-
uint64val);
88+
staticinlineboolLWLockAcquireCommon(LWLock*l,LWLockModemode,
89+
uint64*valptr,uint64val);
9090

9191
#ifdefLWLOCK_STATS
9292
typedefstructlwlock_stats_key
@@ -510,7 +510,7 @@ LWLockAcquireWithVar(LWLock *l, uint64 *valptr, uint64 val)
510510
}
511511

512512
/* internal function to implement LWLockAcquire and LWLockAcquireWithVar */
513-
staticbool
513+
staticinlinebool
514514
LWLockAcquireCommon(LWLock*l,LWLockModemode,uint64*valptr,uint64val)
515515
{
516516
volatileLWLock*lock=l;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp