Gabe Black has uploaded this change for review. ( https://gem5-review.googlesource.com/c/public/gem5/+/32929 )

Change subject: arch: Don't add contents to the TheISA namespace in arch/generic.
......................................................................

arch: Don't add contents to the TheISA namespace in arch/generic.

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
---
M src/arch/generic/locked_mem.hh
M src/arch/null/locked_mem.hh
M src/arch/power/locked_mem.hh
M src/arch/sparc/locked_mem.hh
M src/arch/x86/locked_mem.hh
5 files changed, 35 insertions(+), 2 deletions(-)



diff --git a/src/arch/generic/locked_mem.hh b/src/arch/generic/locked_mem.hh
index 5fcb732..66a8f43 100644
--- a/src/arch/generic/locked_mem.hh
+++ b/src/arch/generic/locked_mem.hh
@@ -47,12 +47,15 @@
  * 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 @@
 {
 }

+} // namespace LockedMem
+
 } // namespace Generic ISA

 #endif
diff --git a/src/arch/null/locked_mem.hh b/src/arch/null/locked_mem.hh
index e1e9cde..876d8b9 100644
--- a/src/arch/null/locked_mem.hh
+++ b/src/arch/null/locked_mem.hh
@@ -49,4 +49,11 @@

 #include "arch/generic/locked_mem.hh"

+namespace NullISA
+{
+
+using namespace GenericISA::LockedMem;
+
+} // namespace NullISA
+
 #endif
diff --git a/src/arch/power/locked_mem.hh b/src/arch/power/locked_mem.hh
index 8546b51..153f602 100644
--- a/src/arch/power/locked_mem.hh
+++ b/src/arch/power/locked_mem.hh
@@ -39,4 +39,11 @@

 #include "arch/generic/locked_mem.hh"

+namespace PowerISA
+{
+
+using namespace GenericISA::LockedMem;
+
+} // namespace PowerISA
+
 #endif // __ARCH_POWER_LOCKED_MEM_HH__
diff --git a/src/arch/sparc/locked_mem.hh b/src/arch/sparc/locked_mem.hh
index d73aab4..5521828 100644
--- a/src/arch/sparc/locked_mem.hh
+++ b/src/arch/sparc/locked_mem.hh
@@ -37,4 +37,11 @@

 #include "arch/generic/locked_mem.hh"

+namespace SparcISA
+{
+
+using namespace GenericISA::LockedMem;
+
+} // namespace SparcISA
+
 #endif
diff --git a/src/arch/x86/locked_mem.hh b/src/arch/x86/locked_mem.hh
index 6d4e8b7..2ff4781 100644
--- a/src/arch/x86/locked_mem.hh
+++ b/src/arch/x86/locked_mem.hh
@@ -37,4 +37,11 @@

 #include "arch/generic/locked_mem.hh"

+namespace X86ISA
+{
+
+using namespace GenericISA::LockedMem;
+
+} // namespace X86ISA
+
 #endif // __ARCH_X86_LOCKEDMEM_HH__

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/32929
To unsubscribe, or for help writing mail filters, visit https://gem5-review.googlesource.com/settings

Gerrit-Project: public/gem5
Gerrit-Branch: develop
Gerrit-Change-Id: I15bfaf56e76ffdc3bdb603deef4ad471211f4f24
Gerrit-Change-Number: 32929
Gerrit-PatchSet: 1
Gerrit-Owner: Gabe Black <gabebl...@google.com>
Gerrit-MessageType: newchange
_______________________________________________
gem5-dev mailing list -- gem5-dev@gem5.org
To unsubscribe send an email to gem5-dev-le...@gem5.org
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s

Reply via email to