pgsql: Make init_spin_delay() C89 compliant #2.

From: Andres Freund <andres(at)anarazel(dot)de>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Make init_spin_delay() C89 compliant #2.
Date: 2016-04-15 02:28:41
Message-ID: E1aqtUv-0005mR-4f@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Make init_spin_delay() C89 compliant #2.

My previous attempt at doing so, in 80abbeba23, was not sufficient. While that
fixed the problem for bufmgr.c and lwlock.c , s_lock.c still has non-constant
expressions in the struct initializer, because the file/line/function
information comes from the caller of s_lock().

Give up on using a macro, and use a static inline instead.

Discussion: 4369(dot)1460435533(at)sss(dot)pgh(dot)pa(dot)us

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/4b74c6a40e7ac9dad7cdeb4cfd2d51ea60cfdbb5

Modified Files
--------------
src/backend/storage/buffer/bufmgr.c | 8 ++++++--
src/backend/storage/lmgr/lwlock.c | 4 +++-
src/backend/storage/lmgr/s_lock.c | 4 +++-
src/include/storage/s_lock.h | 15 +++++++++++++--
4 files changed, 25 insertions(+), 6 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Andres Freund 2016-04-15 02:28:42 pgsql: Remove trailing commas in enums.
Previous Message Andres Freund 2016-04-15 02:17:02 Re: [COMMITTERS] pgsql: Allow Pin/UnpinBuffer to operate in a lockfree manner.