Re: global barrier & atomics in signal handlers (Re: Atomic operations within spinlocks)

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: global barrier & atomics in signal handlers (Re: Atomic operations within spinlocks)
Дата
Msg-id 1552803.1592497780@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: global barrier & atomics in signal handlers (Re: Atomicoperations within spinlocks)  (Robert Haas <robertmhaas@gmail.com>)
Ответы Re: global barrier & atomics in signal handlers (Re: Atomicoperations within spinlocks)  (Andres Freund <andres@anarazel.de>)
Список pgsql-hackers
Robert Haas <robertmhaas@gmail.com> writes:
> On Thu, Jun 18, 2020 at 11:59 AM Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> Sure, but wouldn't making the SpinLockAcquire layer into static inlines be
>> sufficient to address that point, with no need to touch s_lock.h at all?

> I mean, wouldn't you then end up with a bunch of 1-line functions
> where you can step into the function but not through whatever
> individual things it does?

Not following your point.  The s_lock.h implementations tend to be either
simple C statements ("*lock = 0") or asm blocks; if you feel a need to
step through them you're going to be resorting to "si" anyway.

I think the main usefulness of doing anything here would be (a) separating
the spinlock infrastructure from callers and (b) ensuring that we have a
declared argument type, and single-evaluation semantics, for the spinlock
function parameters.  Both of those are adequately addressed by fixing
spin.h, IMO anyway.

            regards, tom lane



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

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: jsonpath versus NaN
Следующее
От: Robert Haas
Дата:
Сообщение: Re: [patch] demote