K 10 svn:author V 8 hselasky K 8 svn:date V 27 2012-08-10T15:21:12.569876Z K 7 svn:log V 681 Switch unit management in UCOM to unrhdr. Extend the callback table of UCOM to include a "ucom_free" function pointer which is called when all refs on a UCOM super structure is gone. Implement various helper functions to handle refcounting and draining on the UCOM super structure. Implement macro which can be used in device drivers to avoid module unload before all pending TTY references are gone. The UCOM API is backwards compatible after this change and device drivers require no changes to function with this change. Only a recompilation of UCOM device drivers is required. The FreeBSD version has been bumped in that regard. Discussed with: kib, ed MFC after: 2 weeks END