postgresql/src/backend/storage
Andres Freund a4b09af3e9 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:23 +02:00
..
buffer Fix a couple of bugs with wal_log_hints. 2015-06-26 12:38:24 +03:00
file Remove special cases for ETXTBSY from new fsync'ing logic. 2015-05-29 15:11:36 -04:00
freespace Update copyright for 2015 2015-01-06 11:43:47 -05:00
ipc pgindent run for 9.5 2015-05-23 21:35:49 -04:00
large_object Use FLEXIBLE_ARRAY_MEMBER in struct varlena. 2015-02-20 16:51:53 -05:00
lmgr Micro optimize LWLockAttemptLock() a bit. 2015-08-02 18:41:23 +02:00
page pgindent run for 9.5 2015-05-23 21:35:49 -04:00
smgr pgindent run for 9.5 2015-05-23 21:35:49 -04:00
Makefile Remove cvs keywords from all files. 2010-09-20 22:08:53 +02:00