MXS-1506: Make heartbeat reads atomic

The old hkheartbeat variable was changed to the mxs_clock() function that
simply wraps an atomic load of the variable. This allows it to be
correctly read by MaxScale as well as opening up the possibility of
converting the value load to a relaxed memory order read.

Renamed the header and associated macros. Removed inclusion of the
heartbeat header from the housekeeper header and added it to the files
that were missing it.
This commit is contained in:
Markus Mäkelä
2018-04-02 14:12:25 +03:00
parent 761fda2806
commit b33f464eea
16 changed files with 63 additions and 51 deletions

View File

@ -31,7 +31,7 @@
#include <maxscale/thread.h>
#include <maxscale/utils.h>
#include <maxscale/config.h>
#include <maxscale/hk_heartbeat.h>
#include <maxscale/clock.h>
#include <maxscale/http.hh>
#include <maxscale/adminusers.h>