diff options
author | Lukas Larsson <[email protected]> | 2015-07-16 11:24:51 +0200 |
---|---|---|
committer | Lukas Larsson <[email protected]> | 2016-02-02 10:45:22 +0100 |
commit | dc1e3933e633d9d7527e6df044895d12d3845e14 (patch) | |
tree | 45ae1272d657fc2a47178cfedc1c29105e92c318 /erts/include | |
parent | 2181f97655906dac3b18333c149c384e1dc81c2b (diff) | |
download | otp-dc1e3933e633d9d7527e6df044895d12d3845e14.tar.gz otp-dc1e3933e633d9d7527e6df044895d12d3845e14.tar.bz2 otp-dc1e3933e633d9d7527e6df044895d12d3845e14.zip |
erts: Add rdtscp instruction check
Diffstat (limited to 'erts/include')
-rw-r--r-- | erts/include/internal/ethr_internal.h | 1 | ||||
-rw-r--r-- | erts/include/internal/ethread.h | 5 |
2 files changed, 5 insertions, 1 deletions
diff --git a/erts/include/internal/ethr_internal.h b/erts/include/internal/ethr_internal.h index d4ded6ff05..693b34df61 100644 --- a/erts/include/internal/ethr_internal.h +++ b/erts/include/internal/ethr_internal.h @@ -92,7 +92,6 @@ void ethr_run_exit_handlers__(void); void ethr_ts_event_destructor__(void *vtsep); #if defined(ETHR_X86_RUNTIME_CONF__) -int ethr_x86_have_cpuid__(void); void ethr_x86_cpuid__(int *eax, int *ebx, int *ecx, int *edx); #endif diff --git a/erts/include/internal/ethread.h b/erts/include/internal/ethread.h index 4eeb7097f4..9956473057 100644 --- a/erts/include/internal/ethread.h +++ b/erts/include/internal/ethread.h @@ -282,6 +282,10 @@ ETHR_PROTO_NORETURN__ ethr_fatal_error__(const char *file, (__builtin_expect(ethr_runtime__.conf.have_sse2 != 0, 1)) # define ETHR_X86_RUNTIME_CONF_HAVE_NO_SSE2__ \ (__builtin_expect(ethr_runtime__.conf.have_sse2 == 0, 0)) +# define ETHR_X86_RUNTIME_CONF_HAVE_RDTSCP__ \ + (__builtin_expect(ethr_runtime__.conf.have_rdtscp != 0, 1)) +# define ETHR_X86_RUNTIME_CONF_HAVE_NO_RDTSCP__ \ + (__builtin_expect(ethr_runtime__.conf.have_rdtscp == 0, 0)) #endif #if (defined(__GNUC__) \ @@ -300,6 +304,7 @@ typedef struct { #if defined(ETHR_X86_RUNTIME_CONF__) int have_dw_cmpxchg; int have_sse2; + int have_rdtscp; #endif #if defined(ETHR_PPC_RUNTIME_CONF__) int have_lwsync; |