Source code from "Programming with POSIX® Threads" book By David R. Butenhof