Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Add support of ARM in SpinPause.
TODO: Need some benchmarks to see whether it could help ARM device.
Motivation and Context
Currently, SpinPause is empty for ARM, which means CPU might be very busy when nothing is called in a loop.
Some References if we want to support other platforms:
https://github.com/boostorg/atomic/blob/b202228311eb4f5a9568d40b9314dfbb4ef20607/include/boost/atomic/detail/pause.hpp#L40-L59
https://github.com/boostorg/fiber/blob/7838ab09d700214e3d7dd7104fce241ca7552336/include/boost/fiber/detail/cpu_relax.hpp#L32-L78
https://github.com/tpn/winsdk-10/blob/9b69fd26ac0c7d0b83d378dba01080e93349c2ed/Include/10.0.14393.0/um/ntarm_x.h#L82-L90
https://chromium.googlesource.com/chromium/src/third_party/WebKit/Source/wtf/+/823d62cdecdbd5f161634177e130e5ac01eb7b48/SpinLock.cpp#17
https://github.com/wine-mirror/wine/blob/c9a8333c0f274201faf33d27abda1ebb5ae07cec/include/winnt.h#L7387C25-L7398
https://github.com/Tencent/mars/blob/master/mars/comm/thread/spinlock.h#L92-L107