This could be triggered if dbCaRemoveLink() is called on a link for
which there is an outstanding dbCaPutCallback().
Normally a dbCaPutCallback() callback routine is passed the associated
userPvt pointer as an argument, but in the event that dbCaRemoveLink()
gets used on the same link between the put and its completion callback,
the callback routine was being called with the link pointer as the
argument instead.
For all the existing Asyn Soft Channel device supports this is not a
problem as they all pass the link pointer as their userPvt argument, but
that won't necessarily always be the case.
Also updated the comments describing the process of removing links.
The main reason for this merge proposal is the change to "public" API functions.
Use atomic counter to resolve data race on threadsRunning in callback.
Split up callbackShutdown() and scanShutdown() into two phases *Stop() and
*Cleanup(). The *Stop() functions signal worker threads, and wait for them to
exit. The *Cleanup() functions actually reclaim global resources.
These two mechanisms have couplings which are quite complex. I/O Intr scans
involve both scan lists and callbacks.
Changed device support to use the long string input rectype.
Moved the device registration into its own file.
Used _APPNAME_ more, trying to prevent future name clashes.
Added -q (quiet) flag, renamed INSTALL_QUIETLY build variable.
Moved GENVERSION variables into normal locations.
Changed from :: rule to : rule with FORCE dependency.
Removed use of --git-dir, only works when CWD is TOP.
Simplified some parts, more perlish.
Added VCS used to generated output file.
Expanded on the -v (verbose) output.
From Benjamin Franksen:
There is one remaining problem with the order of includes in the build
rules for 3.14.12.5: configure/RULES_BUILD includes RULES_FILE_TYPE
(which in turn includes the cfg/RULES* from modules in the RELEASE file)
*after* including RULES.Db and RULES_JAVA. This makes it impossible to
override (pattern) rules in one of these files. Instead,
$(CONFIG)/RULES_FILE_TYPE should be included first.