add file thrd_join.c and thrd_cleanup.c