summaryrefslogtreecommitdiff
path: root/src/mscorlib/src/System/Threading/Volatile.cs
diff options
context:
space:
mode:
Diffstat (limited to 'src/mscorlib/src/System/Threading/Volatile.cs')
-rw-r--r--src/mscorlib/src/System/Threading/Volatile.cs53
1 files changed, 27 insertions, 26 deletions
diff --git a/src/mscorlib/src/System/Threading/Volatile.cs b/src/mscorlib/src/System/Threading/Volatile.cs
index c94a69ab7b..6aac8d63cd 100644
--- a/src/mscorlib/src/System/Threading/Volatile.cs
+++ b/src/mscorlib/src/System/Threading/Volatile.cs
@@ -3,6 +3,7 @@
// See the LICENSE file in the project root for more information.
//
+
using System;
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
@@ -33,7 +34,7 @@ namespace System.Threading
// The VM will replace this with a more efficient implementation.
//
var value = location;
- Thread.MemoryBarrier();
+ Interlocked.MemoryBarrier();
return value;
}
@@ -45,7 +46,7 @@ namespace System.Threading
// The VM will replace this with a more efficient implementation.
//
var value = location;
- Thread.MemoryBarrier();
+ Interlocked.MemoryBarrier();
return value;
}
@@ -56,7 +57,7 @@ namespace System.Threading
// The VM will replace this with a more efficient implementation.
//
var value = location;
- Thread.MemoryBarrier();
+ Interlocked.MemoryBarrier();
return value;
}
@@ -67,7 +68,7 @@ namespace System.Threading
// The VM will replace this with a more efficient implementation.
//
var value = location;
- Thread.MemoryBarrier();
+ Interlocked.MemoryBarrier();
return value;
}
@@ -79,7 +80,7 @@ namespace System.Threading
// The VM will replace this with a more efficient implementation.
//
var value = location;
- Thread.MemoryBarrier();
+ Interlocked.MemoryBarrier();
return value;
}
@@ -90,7 +91,7 @@ namespace System.Threading
// The VM will replace this with a more efficient implementation.
//
var value = location;
- Thread.MemoryBarrier();
+ Interlocked.MemoryBarrier();
return value;
}
@@ -102,7 +103,7 @@ namespace System.Threading
// The VM will replace this with a more efficient implementation.
//
var value = location;
- Thread.MemoryBarrier();
+ Interlocked.MemoryBarrier();
return value;
}
@@ -114,7 +115,7 @@ namespace System.Threading
// The VM will replace this with a more efficient implementation.
//
var value = location;
- Thread.MemoryBarrier();
+ Interlocked.MemoryBarrier();
return value;
}
@@ -126,7 +127,7 @@ namespace System.Threading
// The VM will replace this with a more efficient implementation.
//
var value = location;
- Thread.MemoryBarrier();
+ Interlocked.MemoryBarrier();
return value;
}
#else
@@ -165,7 +166,7 @@ namespace System.Threading
// The VM will replace this with a more efficient implementation.
//
var value = location;
- Thread.MemoryBarrier();
+ Interlocked.MemoryBarrier();
return value;
}
@@ -177,7 +178,7 @@ namespace System.Threading
// The VM will replace this with a more efficient implementation.
//
var value = location;
- Thread.MemoryBarrier();
+ Interlocked.MemoryBarrier();
return value;
}
@@ -188,7 +189,7 @@ namespace System.Threading
// The VM will replace this with a more efficient implementation.
//
var value = location;
- Thread.MemoryBarrier();
+ Interlocked.MemoryBarrier();
return value;
}
@@ -211,7 +212,7 @@ namespace System.Threading
// The VM will replace this with a more efficient implementation.
//
var value = location;
- Thread.MemoryBarrier();
+ Interlocked.MemoryBarrier();
return value;
}
@@ -224,7 +225,7 @@ namespace System.Threading
//
// The VM will replace this with a more efficient implementation.
//
- Thread.MemoryBarrier();
+ Interlocked.MemoryBarrier();
location = value;
}
@@ -235,7 +236,7 @@ namespace System.Threading
//
// The VM will replace this with a more efficient implementation.
//
- Thread.MemoryBarrier();
+ Interlocked.MemoryBarrier();
location = value;
}
@@ -245,7 +246,7 @@ namespace System.Threading
//
// The VM will replace this with a more efficient implementation.
//
- Thread.MemoryBarrier();
+ Interlocked.MemoryBarrier();
location = value;
}
@@ -255,7 +256,7 @@ namespace System.Threading
//
// The VM will replace this with a more efficient implementation.
//
- Thread.MemoryBarrier();
+ Interlocked.MemoryBarrier();
location = value;
}
@@ -266,7 +267,7 @@ namespace System.Threading
//
// The VM will replace this with a more efficient implementation.
//
- Thread.MemoryBarrier();
+ Interlocked.MemoryBarrier();
location = value;
}
@@ -276,7 +277,7 @@ namespace System.Threading
//
// The VM will replace this with a more efficient implementation.
//
- Thread.MemoryBarrier();
+ Interlocked.MemoryBarrier();
location = value;
}
@@ -287,7 +288,7 @@ namespace System.Threading
//
// The VM will replace this with a more efficient implementation.
//
- Thread.MemoryBarrier();
+ Interlocked.MemoryBarrier();
location = value;
}
@@ -298,7 +299,7 @@ namespace System.Threading
//
// The VM will replace this with a more efficient implementation.
//
- Thread.MemoryBarrier();
+ Interlocked.MemoryBarrier();
location = value;
}
@@ -309,7 +310,7 @@ namespace System.Threading
//
// The VM will replace this with a more efficient implementation.
//
- Thread.MemoryBarrier();
+ Interlocked.MemoryBarrier();
location = value;
}
#else
@@ -353,7 +354,7 @@ namespace System.Threading
//
// The VM will replace this with a more efficient implementation.
//
- Thread.MemoryBarrier();
+ Interlocked.MemoryBarrier();
location = value;
}
@@ -364,7 +365,7 @@ namespace System.Threading
//
// The VM will replace this with a more efficient implementation.
//
- Thread.MemoryBarrier();
+ Interlocked.MemoryBarrier();
location = value;
}
@@ -374,7 +375,7 @@ namespace System.Threading
//
// The VM will replace this with a more efficient implementation.
//
- Thread.MemoryBarrier();
+ Interlocked.MemoryBarrier();
location = value;
}
@@ -396,7 +397,7 @@ namespace System.Threading
//
// The VM will replace this with a more efficient implementation.
//
- Thread.MemoryBarrier();
+ Interlocked.MemoryBarrier();
location = value;
}
}