]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MEDIUM: map/acl: Replace map/acl spin lock by a read/write lock.
authorFrédéric Lécaille <flecaille@haproxy.com>
Mon, 21 Aug 2023 16:44:24 +0000 (18:44 +0200)
committerWilly Tarreau <w@1wt.eu>
Fri, 25 Aug 2023 13:42:03 +0000 (15:42 +0200)
commit81815a9a83517e0b4f2ec0e33f5de02e3927d86c
tree3c22d7da13e609e1aeba8f095cc2b62b69fa0acf
parent5fea59754b7765ca83aea3813f8b375160c7f3b0
MEDIUM: map/acl: Replace map/acl spin lock by a read/write lock.

Replace ->lock type of pat_ref struct by HA_RWLOCK_T.
Replace all calls to HA_SPIN_LOCK() (resp. HA_SPIN_UNLOCK()) by HA_RWLOCK_WRLOCK()
(resp. HA_RWLOCK_WRUNLOCK()) when a write access is required.
There is only one read access which is needed. This is in the "show map" command
callback, cli_io_handler_map_lookup() where a HA_SPIN_LOCK() call is replaced
by HA_RWLOCK_RDLOCK() (resp. HA_SPIN_UNLOCK() by HA_RWLOCK_RDUNLOCK).
Replace HA_SPIN_INIT() calls by HA_RWLOCK_INIT() calls.
include/haproxy/pattern-t.h
src/hlua.c
src/http_act.c
src/map.c
src/pattern.c