Tweak obtain lock for more accurate PTTRACE timestamp,
fix retcode test in try_obtain_wrlock.