1
0
mirror of https://github.com/postgres/postgres.git synced 2025-09-02 04:21:28 +03:00
Files
postgres/src/backend/storage
Andres Freund 9074e41dbd Micro optimize LWLockAttemptLock() a bit.
LWLockAttemptLock pointlessly read the lock's state in every loop
iteration, even though pg_atomic_compare_exchange_u32() returns the old
value. Instead do that only once before the loop iteration.

Additionally there's no need to have the expected_state variable,
old_state mostly had the same value anyway.

Noticed-By: Heikki Linnakangas
Backpatch: 9.5, no reason to let the branches diverge at this point
2015-08-02 18:41:41 +02:00
..
2015-01-06 11:43:47 -05:00
2015-05-23 21:35:49 -04:00
2015-05-23 21:35:49 -04:00
2015-05-23 21:35:49 -04:00
2010-09-20 22:08:53 +02:00