K 10 svn:author V 3 jhb K 8 svn:date V 27 2011-11-16T17:48:05.267513Z K 7 svn:log V 602 Partially MFC 218195, 218424, and 221829: - Put the general logic for being a CPU hog into a new function should_yield(). - Encapsulate the common case of check-and-yield into a new function maybe_yield(). - Add kern_yield() as a more generic version of uio_yield() and reimplement uio_yield() in terms of kern_yield(). To preserve the ABI of struct thread, should_yield() in 8 continues to use PCPU_GET(switchticks) rather than the td_swvolticks added in 9. Also, existing users of uio_yield() are left unchanged. Instead, the routines are merely added for use by new code. Reviewed by: mdf END