We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 40504cd + 380d827 commit ebe5ad3Copy full SHA for ebe5ad3
src/NetMQ/Core/Utils/OpCode.cs
@@ -12,13 +12,21 @@ internal static class Opcode
12
13
public static bool Open()
14
{
15
+#if NETSTANDARD1_1_OR_GREATER || NET471_OR_GREATER
16
+ if (RuntimeInformation.ProcessArchitecture != Architecture.X86 &&
17
+ RuntimeInformation.ProcessArchitecture != Architecture.X64)
18
+ {
19
+ return false; // RDTSC instruction not supported
20
+ }
21
+#endif
22
+
23
var p = (int)Environment.OSVersion.Platform;
24
25
byte[] rdtscCode = IntPtr.Size == 4 ? RDTSC_32 : RDTSC_64;
26
27
s_size = (ulong)(rdtscCode.Length);
28
- if ((p == 4) || (p == 128))
29
+ if ((p == 4) || (p == 128)) // Unix || Mono on Unix
30
31
// Unix
32
if (IsARMArchitecture()) return false;
0 commit comments