[NFC] Replace HEADER_GLOBAL with inline (C++17).

HEADER_GLOBAL was using non-standard attributes to achieve what C++17
now permits with a keyword.  Use the standard formulation.

Update the README to note that gcc is still not recommended, but because
of its poor codegen for 128-bit atomic compare and exchange, rather than
because it doesn't support the attribute used for HEADER_GLOBAL.
This commit is contained in:
David Chisnall
2019-08-13 14:03:37 +01:00
committed by David Chisnall
parent bbf016bac8
commit 6dbe24da2e
5 changed files with 7 additions and 16 deletions

View File

@@ -231,8 +231,8 @@ namespace snmalloc
}
# endif
};
HEADER_GLOBAL std::atomic<uint64_t> PALWindows::pressure_epoch;
HEADER_GLOBAL std::atomic<bool> PALWindows::registered_for_notifications;
HEADER_GLOBAL HANDLE PALWindows::lowMemoryObject;
inline std::atomic<uint64_t> PALWindows::pressure_epoch;
inline std::atomic<bool> PALWindows::registered_for_notifications;
inline HANDLE PALWindows::lowMemoryObject;
}
#endif