add thread.c to master