pgsql: Don't let protected variable access to be reordered after spinlo

Поиск
Список
Период
Сортировка
От Heikki Linnakangas
Тема pgsql: Don't let protected variable access to be reordered after spinlo
Дата
Msg-id E1XdwJT-0004sm-Uv@gemulon.postgresql.org
обсуждение исходный текст
Список pgsql-committers
Don't let protected variable access to be reordered after spinlock release.

LWLockAcquireWithVar needs to set the protected variable while holding
the spinlock. Need to use a volatile pointer to make sure it doesn't get
reordered by the compiler. The other functions that accessed the protected
variable already got this right.

9.4 only. Earlier releases didn't have this code, and in master, spinlock
release acts as a compiler barrier.

Branch
------
REL9_4_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/4971c36b46c63c0b36a38df6a4b6ad9f303e4620

Modified Files
--------------
src/backend/storage/lmgr/lwlock.c |    5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)


В списке pgsql-committers по дате отправления:

Предыдущее
От: Heikki Linnakangas
Дата:
Сообщение: pgsql: Fix deadlock with LWLockAcquireWithVar and LWLockWaitForVar.
Следующее
От: Heikki Linnakangas
Дата:
Сообщение: pgsql: Fix deadlock with LWLockAcquireWithVar and LWLockWaitForVar.