arch: Don't add contents to the TheISA namespace in arch/generic.
authorGabe Black <gabeblack@google.com>
Wed, 19 Aug 2020 10:09:12 +0000 (03:09 -0700)
committerGabe Black <gabeblack@google.com>
Thu, 20 Aug 2020 01:36:24 +0000 (01:36 +0000)
Instead, add what you want other ISAs to be able to use to a generic,
fixed namespace, and then let those other ISAs bring those symbols in
with "using" if they want them.

Change-Id: I15bfaf56e76ffdc3bdb603deef4ad471211f4f24
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/32929
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>
Tested-by: kokoro <noreply+kokoro@google.com>
src/arch/generic/locked_mem.hh
src/arch/null/locked_mem.hh
src/arch/power/locked_mem.hh
src/arch/sparc/locked_mem.hh
src/arch/x86/locked_mem.hh

index 5fcb732be031db29193e96b0ebd0dc6db993e7f7..66a8f43010af156f333bce2049a98ee3acd954dc 100644 (file)
  * Generic helper functions for locked memory accesses.
  */
 
-#include "config/the_isa.hh"
 #include "mem/packet.hh"
 #include "mem/request.hh"
 
-namespace TheISA
+namespace GenericISA
 {
+
+namespace LockedMem
+{
+
 template <class XC>
 inline void
 handleLockedSnoop(XC *xc, PacketPtr pkt, Addr cacheBlockMask)
@@ -85,6 +88,8 @@ globalClearExclusive(XC *xc)
 {
 }
 
+} // namespace LockedMem
+
 } // namespace Generic ISA
 
 #endif
index e1e9cdee32d36cb12c333d72c48bfc104b638a25..876d8b9d5967c6f4644362d57f22b85c5f93d003 100644 (file)
 
 #include "arch/generic/locked_mem.hh"
 
+namespace NullISA
+{
+
+using namespace GenericISA::LockedMem;
+
+} // namespace NullISA
+
 #endif
index 8546b51c8635d7864d169b1591f86053a9e235ed..153f602be556912c3c6adc05688501537d4e3424 100644 (file)
 
 #include "arch/generic/locked_mem.hh"
 
+namespace PowerISA
+{
+
+using namespace GenericISA::LockedMem;
+
+} // namespace PowerISA
+
 #endif // __ARCH_POWER_LOCKED_MEM_HH__
index d73aab480780a93b50a1ba2d09d0211e13950695..55218286067c150ec0fda28624d0a5b42541ddb2 100644 (file)
 
 #include "arch/generic/locked_mem.hh"
 
+namespace SparcISA
+{
+
+using namespace GenericISA::LockedMem;
+
+} // namespace SparcISA
+
 #endif
index 6d4e8b7aaae4c08c20bc013da24c45ef52b88a67..2ff47817091c3a1e56cd2b71a1bb5428abb5ccd3 100644 (file)
 
 #include "arch/generic/locked_mem.hh"
 
+namespace X86ISA
+{
+
+using namespace GenericISA::LockedMem;
+
+} // namespace X86ISA
+
 #endif // __ARCH_X86_LOCKEDMEM_HH__