Copy head (r256279) to stable/10 as part of the 10.0-RELEASE cycle.Approved by: re (implicit)Sponsored by: The FreeBSD Foundation
Add missing header needed by sleep(3).
initialize mutex and cv.
Fix spelling.
Add a test for pthread's cv and cancellation.