From b653e5ea1053502b99fbd886b75b916adcc14c7a Mon Sep 17 00:00:00 2001 From: Giacomo Travaglini Date: Thu, 5 Dec 2019 11:05:49 +0000 Subject: base: Move AtomicOpFunctors to a dedicated header src/base/types.hh file definition is: /** * @file * Defines global host-dependent types: * Counter, Tick, and (indirectly) {int,uint}{8,16,32,64}_t. */ I feel AtomicOpFunctor doesn't fall in this cathegory so I am moving those into a dedicated header: base/amo.hh Change-Id: I8f05fb0944c03e4053cfaf2ffe65cac803df1d93 Signed-off-by: Giacomo Travaglini Reviewed-by: Nikos Nikoleris Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/23563 Reviewed-by: Daniel Carvalho Reviewed-by: Jason Lowe-Power Maintainer: Jason Lowe-Power Tested-by: kokoro --- src/base/types.hh | 17 ----------------- 1 file changed, 17 deletions(-) (limited to 'src/base/types.hh') diff --git a/src/base/types.hh b/src/base/types.hh index 453309416..f93675303 100644 --- a/src/base/types.hh +++ b/src/base/types.hh @@ -244,23 +244,6 @@ typedef std::shared_ptr Fault; // we just create an alias. constexpr decltype(nullptr) NoFault = nullptr; -struct AtomicOpFunctor -{ - virtual void operator()(uint8_t *p) = 0; - virtual AtomicOpFunctor* clone() = 0; - virtual ~AtomicOpFunctor() {} -}; - -template -struct TypedAtomicOpFunctor : public AtomicOpFunctor -{ - void operator()(uint8_t *p) { execute((T *)p); } - virtual AtomicOpFunctor* clone() = 0; - virtual void execute(T * p) = 0; -}; - -typedef std::unique_ptr AtomicOpFunctorPtr; - enum ByteOrder { BigEndianByteOrder, LittleEndianByteOrder -- cgit v1.2.3