]> git.ipfire.org Git - thirdparty/bind9.git/commit
Refactor the use of atomics in netmgr
authorOndřej Surý <ondrej@isc.org>
Fri, 24 Mar 2023 12:37:19 +0000 (13:37 +0100)
committerOndřej Surý <ondrej@isc.org>
Thu, 30 Mar 2023 14:10:08 +0000 (16:10 +0200)
commite1a4572fd68f0b039594fbf8cfbdc957df07e198
tree8da4a58e8dd823e50d3d4b43d12a72e97c059151
parentea8e00e7a5e616c73389b0c26d8452d5b8475d63
Refactor the use of atomics in netmgr

Now that everything runs on their own loop and we don't cross the thread
boundaries (with few exceptions), most of the atomic_bool variables used
to track the socket state have been unatomicized because they are always
accessed from the matching thread.

The remaining few have been relaxed: a) the sock->active is now using
acquire/release memory ordering; b) the various global limits are now
using relaxed memory ordering - we don't really care about the
synchronization for those.
lib/isc/netmgr/http.c
lib/isc/netmgr/netmgr-int.h
lib/isc/netmgr/netmgr.c
lib/isc/netmgr/streamdns.c
lib/isc/netmgr/tcp.c
lib/isc/netmgr/tlsstream.c
lib/isc/netmgr/udp.c