Re: Non-volatile variables used for spinlock manipulation
В списке pgsql-hackers по дате отправления:
| От | Andres Freund |
|---|---|
| Тема | Re: Non-volatile variables used for spinlock manipulation |
| Дата | |
| Msg-id | 20150904141426.GA5516@awork2.anarazel.de обсуждение исходный текст |
| Ответ на | Re: Non-volatile variables used for spinlock manipulation (Tom Lane <tgl@sss.pgh.pa.us>) |
| Список | pgsql-hackers |
On 2015-09-04 09:42:20 -0400, Tom Lane wrote: > Antonin Houska <ah@cybertec.at> writes: > > Since SpinLockAcquire() / SpinLockRelease() macros usually reference variables > > declared as volatile, I wonder if the following changes should be applied. > > We've been making changes to remove that requirement, so I think that at > least in 9.5/HEAD this isn't an issue anymore. And even before that the pointer passed to SpinLockAcquire/Release() didn't have to be volatile. The important thing was that read/writes that are protected by the spinlock were only done via volatile variables, to prevent them from being moved outside the critical section. All the tas()/unlock section already force the pointer to the lock to be volatile anyway.
В списке pgsql-hackers по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера