record-replay for pthreads