when reconfiguring a server we're in task exclusive mode, which
means the netmgr is paused. previously, when we issued "stoplistening"
events, we would wait for the worker thread to process the event
before proceeding. since that can't happen while paused, we could
hit a deadlock during reconfig if the listen-on addresses changed.
- MSVC doesn't like empty {} initializers
- Emulate stdalign.h on Windows with __declspec(align())
- There's no usleep on Windows
- Add missing symbols to libns.def and libisc.def
- Proper use of SO_REUSE****
- libuv detection in Configure
- Minor fixes to the atomics code
- when we attempt to shut down a parent socket, but its children
still have active handles, the destruction is delayed, and previously
it was never resumed. now, when the last handle for a child socket is
detached, we check again whether the parent can be destroyed.
- the netmgr is not shut down until all references to it are detached.
- document functions in netmgr.h and netmgr-int.h
- combine identical callback typedefs into one
- remove functions that were never called
- make functions called in only one file static
- rename isc__nm_handle_*() functions to isc__nm_async_*() to avoid
confusion with the isc__nmhandle type.
- clean up isc_nmevent structures - make generic types and just typedef to them
- fix atomic clang warnings in astack
- add pause/resume read for TCP
- add sequential (not-pipelining) support for TCPDNS
- keep peer address in the socket for TCP connections, it's constant for a socket
this delays the destruction of the client object until after the
prefetch is finished.
also added some missing CTRACE logging in query.c, in the process of
diagnosing this error.
the advantage of this is it allows the use of memory context
accounting, but it will likely have performance consequences.
XXX: we need to find a way to do a TCPDNS send without having to allocate
and copy the region that's to be sent.
- add reference counters to manager; all client objects attach and
detach from the manager
- ensure that when a client object is detached, if references have gone
to zero, the associated nmhandle object is detached. this should
trigger the freeing of both the nmhandle object and the client object
- as client objects are now allocated along with network manager clients
and will be accounted for by the network manager, there's no longer a
need to call exit_check(). its functions are now replaced by the
nmhandle reset and put callbacks.
- there is no need to keep a 'clients' list in ns_clientmgr()
- (however, TODO, the client manager should now be reference counted)
- added some logging to show when clients are allocated, reset, or freed
- ns_client_next() has no remaining function except to log the reason
for a failure. its name has therefore been changed to ns_client_drop().