]> git.ipfire.org Git - thirdparty/postgresql.git/commitdiff
lwlock: Improve local variable name
authorAndres Freund <andres@anarazel.de>
Wed, 14 Jan 2026 16:15:38 +0000 (11:15 -0500)
committerAndres Freund <andres@anarazel.de>
Wed, 14 Jan 2026 16:15:38 +0000 (11:15 -0500)
In 9a385f61666 I used the variable name new_release_in_progress, but
new_wake_in_progress makes more sense given the flag name.

Suggested-by: Chao Li <li.evan.chao@gmail.com>
Discussion: https://postgr.es/m/AC5E365D-7AD9-47AE-B2C6-25756712B188@gmail.com

src/backend/storage/lmgr/lwlock.c

index 148309cc186d6baf196a263083086e7698f45a08..415794682a27848372cf32a1258ab1697053705b 100644 (file)
@@ -929,7 +929,7 @@ LWLockWaitListUnlock(LWLock *lock)
 static void
 LWLockWakeup(LWLock *lock)
 {
-       bool            new_release_in_progress = false;
+       bool            new_wake_in_progress = false;
        bool            wokeup_somebody = false;
        proclist_head wakeup;
        proclist_mutable_iter iter;
@@ -956,7 +956,7 @@ LWLockWakeup(LWLock *lock)
                         * that are just waiting for the lock to become free don't retry
                         * automatically.
                         */
-                       new_release_in_progress = true;
+                       new_wake_in_progress = true;
 
                        /*
                         * Don't wakeup (further) exclusive locks.
@@ -995,7 +995,7 @@ LWLockWakeup(LWLock *lock)
 
                        /* compute desired flags */
 
-                       if (new_release_in_progress)
+                       if (new_wake_in_progress)
                                desired_state |= LW_FLAG_WAKE_IN_PROGRESS;
                        else
                                desired_state &= ~LW_FLAG_WAKE_IN_PROGRESS;