| От | Tom Lane |
|---|---|
| Тема | Re: Should pointers to PGPROC be volatile-qualified? |
| Дата | |
| Msg-id | 21312.1189019807@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | Re: Should pointers to PGPROC be volatile-qualified? (Brian Hurt <bhurt@janestcapital.com>) |
| Список | pgsql-hackers |
Brian Hurt <bhurt@janestcapital.com> writes:
> Note that all sorts of weirdnesses are possible when you have shared
> mutable state between multiple different threads.
Yeah. In the majority of places this isn't a big problem because
access to shared memory looks like
LWLockAcquire(some_lock);... mess with shared state ...LWLockRelease(some_lock);
and as long as the LWLock functions are extern and not inlineable
all is well. But we do need to be more careful in places where
we're violating that coding rule, and the various stuff that looks
at or changes xid and xmin is violating it.
What I'm inclined to do for now is put "volatile" into those places in
procarray.c where there seems to be a risk.
regards, tom lane
В списке pgsql-hackers по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера