Re: Confusing variable naming in LWLockRelease

2025-02-09 Thread Jacob Brazeal
> I believe it refers to the state of the lock prior to lock acquisition; not prior to subtraction. That definitely makes sense as a way to read this variable in context, but after reviewing other usages of old_state in lwlock.c, I tend to think that this is an outlier usage and maybe the naming w

Re: Confusing variable naming in LWLockRelease

2025-02-05 Thread Jeff Davis
On Wed, 2025-01-29 at 23:16 -0800, Jacob Brazeal wrote: > Here the variable name "oldstate" leads one to believe that the value > is fetched before the sub operation, similar to some other usages in > lwlock.c. I believe it refers to the state of the lock prior to lock acquisition; not prior to su