You signed in with another tab or window.Reload to refresh your session.You signed out in another tab or window.Reload to refresh your session.You switched accounts on another tab or window.Reload to refresh your session.Dismiss alert
Make init_spin_delay() C89 compliant and change stuck spinlock reporting.
The current definition of init_spin_delay (introduced recently in4835458) wasn't C89 compliant. It's not legal to refer to refer tonon-constant expressions, and the ptr argument was one. This, asreported by Tom, lead to a failure on buildfarm animal pademelon.The pointer, especially on system systems with ASLR, isn't super helpfulanyway, though. So instead of making init_spin_delay into an inlinefunction, make s_lock_stuck() report the function name in addition tofile:line and change init_spin_delay() accordingly. While not a directreplacement, the function name is likely more useful anyway (linenumbers are often hard to interpret in third party reports).This also fixes what file/line number is reported for waits vias_lock().As PG_FUNCNAME_MACRO is now used outside of elog.h, move it to c.h.Reported-By: Tom LaneDiscussion: 4369.1460435533@sss.pgh.pa.us