Re: Interrupts vs signals

Поиск
Список
Период
Сортировка
От Heikki Linnakangas
Тема Re: Interrupts vs signals
Дата
Msg-id 8a507fb6-df28-49d3-81a5-ede180d7f0fb@iki.fi
обсуждение исходный текст
Ответ на Re: Interrupts vs signals  (Andres Freund <andres@anarazel.de>)
Ответы Re: Interrupts vs signals
Список pgsql-hackers
On 28/01/2025 19:01, Andres Freund wrote:
> On 2024-12-02 16:39:28 +0200, Heikki Linnakangas wrote:
>> This also moves the WaitEventSet functions to a different source file,
>> waiteventset.c. This separates the platform-dependent code waiting and
>> signalling code from the platform-independent parts.
> 
> I think this should be split into a separate commit. It's painful to verify
> that code-movement didn't change anything else if there's lots of other
> changes in the same commit.

Here's a patch set to do just that, split WaitEventSet stuff to a 
separate source file. That's actually a pretty nice separation even 
without any of the rest of the patches.

I noticed that the ShutdownLatchSupport() function is unused. The first 
patch removes it.

The second patch makes it possible to use ModifyWaitEvent() to switch 
between WL_POSTMASTER_DEATH and WL_EXIT_ON_PM_DEATH. WaitLatch() used to 
modify WaitEventSet->exit_on_postmaster_death directly, now it uses 
ModifyWaitEvent() for that. That's needed because with the final patch, 
WaitLatch() is in a different source file than WaitEventSet, so it 
cannot directly modify its field anymore.

The third patch is mechanical and moves existing code. The file header 
comments in the modified files are perhaps worth reviewing. They are 
also just existing text moved around, but there was some small decisions 
on what exactly should go where.

I'll continue working on the other parts, but these patches seems ready 
for commit already.

-- 
Heikki Linnakangas
Neon (https://neon.tech)

Вложения

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