• Marko Mäkelä's avatar
    MDEV-19845: Fix the build on some x86 targets · 0b7fa5a0
    Marko Mäkelä authored
    The RDTSC instruction, which was introduced in the Intel Pentium,
    has been used in MariaDB for a long time. But, the __rdtsc()
    wrapper is not available by default in some x86 build environments.
    The simplest solution seems to replace the inlined instruction
    with a call to the wrapper function my_timer_cycles(). The overhead
    for the call should not affect the measurement threshold.
    
    On Windows and on AMD64, we will keep using __rdtsc() directly.
    0b7fa5a0
my_cpu.c 3.08 KB