MXS-1883 Maintenance is now the only user-modifiable bit for a monitored server

The request to turn maintenance off/on is a separate flag, although the actual
status is still contained in the status bitfield.
This commit is contained in:
Esa Korhonen
2018-05-24 13:47:56 +03:00
parent 2f48d079db
commit c039821467
11 changed files with 182 additions and 40 deletions

View File

@ -121,4 +121,13 @@ static inline void atomic_synchronize()
*/
bool atomic_cas_ptr(void **variable, void** old_value, void *new_value);
/**
* Atomic read-and-write. Writes new value into the given memory address and returns the old value.
*
* @param variable The variable which is overwritten
* @param new_value The value to write
* @return The value before writing
*/
int atomic_exchange_int(int *variable, int new_value);
MXS_END_DECLS