• Marko Mäkelä's avatar
    MDEV-12534 Use atomic operations whenever available · d34a67b0
    Marko Mäkelä authored
    Allow 64-bit atomic operations on 32-bit systems,
    only relying on HAVE_ATOMIC_BUILTINS_64, disregarding
    the width of the register file.
    
    Define UNIV_WORD_SIZE correctly on all systems, including Windows.
    In MariaDB 10.0 and 10.1, it was incorrectly defined as 4 on
    64-bit Windows.
    
    Define HAVE_ATOMIC_BUILTINS_64 on Windows
    (64-bit atomics are available on both 32-bit and 64-bit Windows
    platforms; the operations were unnecessarily disabled even on
    64-bit Windows).
    
    MONITOR_OS_PENDING_READS, MONITOR_OS_PENDING_WRITES: Enable by default.
    
    os_file_n_pending_preads, os_file_n_pending_pwrites,
    os_n_pending_reads, os_n_pending_writes: Remove.
    Use the monitor counters instead.
    
    os_file_count_mutex: Remove. On a system that does not support
    64-bit atomics, monitor_mutex will be used instead.
    d34a67b0
os0sync.h 28.6 KB