Improve Interlocked.Exchange<T> (#16058)
authormikedn <onemihaid@hotmail.com>
Sun, 28 Jan 2018 18:58:58 +0000 (20:58 +0200)
committerJan Kotas <jkotas@microsoft.com>
Sun, 28 Jan 2018 18:58:58 +0000 (10:58 -0800)
commite3562c9bcc92ec04eec97cf1a945e7ea6d5234d2
treeebda9d8f4bd5b3bd17eb49da0fda64e920923c06
parent256b05fae0d8e7a95235212064463b2ebbcc8f0f
Improve Interlocked.Exchange<T> (#16058)

Replace TypedReference with Unsafe.As, it generates far less code and, with the help of AggresiveInlining, it allows Exchange<T> to inline.
src/mscorlib/src/System/Threading/Interlocked.cs
src/vm/comutilnative.cpp
src/vm/comutilnative.h
src/vm/ecalllist.h