threads\system (.h and .cc) modified