mdbx: add MDBX_SAFE4QEMU option for testing under QEMU.

Change-Id: Ide674e0125e2746f73a7ba44828316a60633e887
This commit is contained in:
Leonid Yuriev
2018-11-26 19:08:30 +03:00
parent 9379ba7733
commit f778f4a795
3 changed files with 7 additions and 4 deletions

View File

@@ -186,7 +186,8 @@ uint64_t entropy_ticks(void) {
ticks |= low & /* zeroes if high part has changed */
~(high_before - high_after);
#endif
#elif defined(__aarch64__) || (defined(__ARM_ARCH) && __ARM_ARCH > 7)
#elif (defined(__aarch64__) || (defined(__ARM_ARCH) && __ARM_ARCH > 7)) && \
!defined(MDBX_SAFE4QEMU)
uint64_t virtual_timer;
__asm __volatile("mrs %0, cntvct_el0" : "=r"(virtual_timer));
return virtual_timer;