Sample thread program contains shared object X accessed by two thread functions.