Implementation of example code in "The Art of Multiprocessor Programming"