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

Commit92b2c13

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 parentae70b9f commit92b2c13

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
@@ -478,7 +478,7 @@ LWLockAcquireWithVar(LWLock *l, uint64 *valptr, uint64 val)
478478
}
479479

480480
/* internal function to implement LWLockAcquire and LWLockAcquireWithVar */
481-
staticbool
481+
staticinlinebool
482482
LWLockAcquireCommon(LWLock*l,LWLockModemode,uint64*valptr,uint64val)
483483
{
484484
volatileLWLock*lock=l;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp