modify the implementation of threads. modify cal_pi_1e9.c