diff options
author | Andres Freund <andres@anarazel.de> | 2016-04-14 19:26:13 -0700 |
---|---|---|
committer | Andres Freund <andres@anarazel.de> | 2016-04-14 19:26:13 -0700 |
commit | 4b74c6a40e7ac9dad7cdeb4cfd2d51ea60cfdbb5 (patch) | |
tree | d01697a882a3da65f0c3fc6c832fd3aa5c535106 /src/backend/storage/lmgr/s_lock.c | |
parent | 533cd2303aa6558721e76295fd1ffb05211764f9 (diff) |
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.1460435533@sss.pgh.pa.us
Diffstat (limited to 'src/backend/storage/lmgr/s_lock.c')
-rw-r--r-- | src/backend/storage/lmgr/s_lock.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/backend/storage/lmgr/s_lock.c b/src/backend/storage/lmgr/s_lock.c index 3902cbf2d96..599940cbd2d 100644 --- a/src/backend/storage/lmgr/s_lock.c +++ b/src/backend/storage/lmgr/s_lock.c @@ -91,7 +91,9 @@ s_lock_stuck(const char *file, int line, const char *func) int s_lock(volatile slock_t *lock, const char *file, int line, const char *func) { - SpinDelayStatus delayStatus = init_spin_delay(file, line, func); + SpinDelayStatus delayStatus; + + init_spin_delay(&delayStatus, file, line, func); while (TAS_SPIN(lock)) { |