Windows: improve shutdown time
authorJeffrey Altman <jaltman@your-file-system.com>
Wed, 20 Jul 2011 18:21:09 +0000 (14:21 -0400)
committerJeffrey Altman <jaltman@openafs.org>
Fri, 22 Jul 2011 15:55:29 +0000 (08:55 -0700)
commitd3a4b6ce700509383849653fa061a87298e5258f
treea830f1ba2adab0713e401dbe73fbc7a4bc8a8b97
parent0783b8f3821f59004146b4c34a53189ada178d70
Windows: improve shutdown time

During Windows OS shutdown the service may be given as little
as six seconds to shut itself down before it will be terminated.
Forced termination will leave the cache file in a dirty state.
This patchset makes several minor changes to reduce the overall
time required for shutdown:

1. do not wait for the IP address change notification thread.
   by the time it terminates the ip address has been lost.

2. send give up all callbacks earlier.

3. reorder the daemon thread waits.

4. change the daemon thread loop sleep time to 500ms in order
   to prevent the service from waiting up to 10 seconds for
   the thread to notice a shutdown is in progress.

Change-Id: Ib1ff3eaf2e5116d9b3d7561670b8266e1bc5d1cf
Reviewed-on: http://gerrit.openafs.org/5055
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
src/WINNT/afsd/cm_daemon.c
src/WINNT/afsd/cm_scache.c