Files
bind9/lib/isc/tests
Ondřej Surý 6cf3b6ae9b Convert .inactivehandles member of isc__nmsocket_t to unlocked list
The .inactivehandles member of isc__nmsocket_t structure is using locked
array stack because the isc_nmhandle_t can be allocated outside of
isc__nmsocket_t matching thread.  With a delayed isc__nmhandle_get()
call, we can ensure that the handle will be always allocated on the
matching thread removing the need to lock the list.

Replace the array stack with simple ISC_LIST structure to store inactive
handles.  This requires the connection callback to not expect valid
isc_nmhandle_t when the error code is not ISC_R_SUCCESS.

Additionally, instead of using fixed size array to store inactive
handles, the list is now unlimited with gradual cleanup when number of
active handles * 2 is smaller than number of inactive handles, there
will be extra isc__nmhandle_t that gets pulled from the list and cleaned
up.
2022-02-24 00:34:41 +01:00
..