diff options
author | Oleksandr Byelkin <sanja@mariadb.com> | 2021-01-06 10:53:00 +0100 |
---|---|---|
committer | Oleksandr Byelkin <sanja@mariadb.com> | 2021-01-06 10:53:00 +0100 |
commit | 02e7bff882c5169ba3e1ce7e9a93d4c28fe3afd1 (patch) | |
tree | 4a6a8d578fedb4c2b1f437ab39c2d7430ad95163 /storage/innobase/include/srv0mon.h | |
parent | 5f10870c8a8c2448bfc26d990110390d48000b84 (diff) | |
parent | 478b83032b170b2ae030fa77fe4bed60a7910472 (diff) | |
download | mariadb-git-02e7bff882c5169ba3e1ce7e9a93d4c28fe3afd1.tar.gz |
Merge commit '10.4' into 10.5
Diffstat (limited to 'storage/innobase/include/srv0mon.h')
-rw-r--r-- | storage/innobase/include/srv0mon.h | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/storage/innobase/include/srv0mon.h b/storage/innobase/include/srv0mon.h index 33d8c57a744..20365ffc7a7 100644 --- a/storage/innobase/include/srv0mon.h +++ b/storage/innobase/include/srv0mon.h @@ -481,23 +481,23 @@ enum mon_option_t { /** This "monitor_set_tbl" is a bitmap records whether a particular monitor counter has been turned on or off */ -extern ulint monitor_set_tbl[(NUM_MONITOR + NUM_BITS_ULINT - 1) / - NUM_BITS_ULINT]; +extern Atomic_relaxed<ulint> + monitor_set_tbl[(NUM_MONITOR + NUM_BITS_ULINT - 1) / NUM_BITS_ULINT]; /** Macros to turn on/off the control bit in monitor_set_tbl for a monitor counter option. */ -#define MONITOR_ON(monitor) \ - (monitor_set_tbl[unsigned(monitor) / NUM_BITS_ULINT] |= \ - (ulint(1) << (unsigned(monitor) % NUM_BITS_ULINT))) +#define MONITOR_ON(monitor) \ + (monitor_set_tbl[unsigned(monitor) / NUM_BITS_ULINT].fetch_or( \ + (ulint(1) << (unsigned(monitor) % NUM_BITS_ULINT)))) -#define MONITOR_OFF(monitor) \ - (monitor_set_tbl[unsigned(monitor) / NUM_BITS_ULINT] &= \ - ~(ulint(1) << (unsigned(monitor) % NUM_BITS_ULINT))) +#define MONITOR_OFF(monitor) \ + (monitor_set_tbl[unsigned(monitor) / NUM_BITS_ULINT].fetch_and( \ + ~(ulint(1) << (unsigned(monitor) % NUM_BITS_ULINT)))) /** Check whether the requested monitor is turned on/off */ -#define MONITOR_IS_ON(monitor) \ - (monitor_set_tbl[unsigned(monitor) / NUM_BITS_ULINT] & \ - (ulint(1) << (unsigned(monitor) % NUM_BITS_ULINT))) +#define MONITOR_IS_ON(monitor) \ + (monitor_set_tbl[unsigned(monitor) / NUM_BITS_ULINT] & \ + (ulint(1) << (unsigned(monitor) % NUM_BITS_ULINT))) /** The actual monitor counter array that records each monintor counter value */ |