Add pthread_exit. But something need to be fixed.