| От | Heikki Linnakangas |
|---|---|
| Тема | Win32 latch implementation revisited |
| Дата | |
| Msg-id | 4C8F46D0.7080408@enterprisedb.com обсуждение исходный текст |
| Ответы |
Re: Win32 latch implementation revisited
|
| Список | pgsql-hackers |
It just occurred to me that the Windows latch implementation goes through a lot of trouble to dynamically assign the shared Windows event handles to the latches in OwnLatch, but there's really no reason why they can't be statically assigned in InitSharedLatch instead. We have to allocate the same amount of event handles anyway. That makes the implementation a lot simpler, eliminating the shared memory block dedicated to latches altogether, and all the related bookkeeping. We no longer need NumSharedLatches() function anymore either, each InitSharedLatch call can allocate a new event handle directly. It was the separation of InitSharedLatch and OwnLatch steps that made this possible, which is probably why this didn't occur to me earlier. Separating those steps was definitely a good move. Unless someone sees a problem with this, I'll commit the attached patch to do the simplification. -- Heikki Linnakangas EnterpriseDB http://www.enterprisedb.com
В списке pgsql-hackers по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера