(Parts of this change were already applied to LLVM code base.)
This change set fixes two bugs in the lock code.
- Misplaced switch target in the __kmp_get_user_lock_owner function found by LLVM user
- Use of incorrect time-stamp counter in the __kmp_spin_backoff function for non-Intel architecture, found by Jim
A new utility function kmp_now_nsec() was added for the second item,
and code for handling wrap-around counters (provided by Jim) was also
added for the kmp_spin_backoff function.
Patch by Hansang Bae