Implement both pthread_yield and c++ thread yield