]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MINOR: threads: inline the wait function for pthread_rwlock emulation
authorWilly Tarreau <w@1wt.eu>
Wed, 16 Aug 2023 20:51:37 +0000 (22:51 +0200)
committerWilly Tarreau <w@1wt.eu>
Wed, 16 Aug 2023 22:09:05 +0000 (00:09 +0200)
commit071d689a514dac522ac3654f53bc22214b5716d0
treeb12d074b2a41f1d385702b142908fd950e8bb5f6
parente56275378fa0d303a58dac69b2c75a5d6ab04f2b
MINOR: threads: inline the wait function for pthread_rwlock emulation

When using pthread_rwlock emulation, contention is reported on
pl_wait_unlock_long(). This is really not convenient to analyse what is
happening. Now plock supports inlining the wait call for just the lorw
functions by enabling PLOCK_LORW_INLINE_WAIT. Let's do this so that now
the wait time will be precisely reported as either pthread_rwlock_rdlock()
or pthread_rwlock_wrlock() depending on the contended function, but no
more on pl_wait_unlock_long(), which will still be reported for all
other locks.
include/haproxy/thread.h