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
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>
This commit is contained in:
Gabe Black
2020-08-19 03:09:12 -07:00
parent 8477866a13
commit 937c4b4003
5 changed files with 35 additions and 2 deletions

View File

@@ -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 @@ globalClearExclusive(XC *xc)
{
}
} // namespace LockedMem
} // namespace Generic ISA
#endif

View File

@@ -49,4 +49,11 @@
#include "arch/generic/locked_mem.hh"
namespace NullISA
{
using namespace GenericISA::LockedMem;
} // namespace NullISA
#endif

View File

@@ -39,4 +39,11 @@
#include "arch/generic/locked_mem.hh"
namespace PowerISA
{
using namespace GenericISA::LockedMem;
} // namespace PowerISA
#endif // __ARCH_POWER_LOCKED_MEM_HH__

View File

@@ -37,4 +37,11 @@
#include "arch/generic/locked_mem.hh"
namespace SparcISA
{
using namespace GenericISA::LockedMem;
} // namespace SparcISA
#endif

View File

@@ -37,4 +37,11 @@
#include "arch/generic/locked_mem.hh"
namespace X86ISA
{
using namespace GenericISA::LockedMem;
} // namespace X86ISA
#endif // __ARCH_X86_LOCKEDMEM_HH__