coding style++

git-svn-id: https://www4.informatik.uni-erlangen.de/i4svn/danceos/trunk/devel/fail@1968 8c4709b5-6ec9-48aa-a5cd-a96041d1645a
This commit is contained in:
adrian
2012-12-05 12:40:34 +00:00
parent 35753cd075
commit b981fdcfea
3 changed files with 11 additions and 15 deletions

View File

@ -8,8 +8,7 @@
* This class will be compiled inside the gem5 context and provides the
* Gem5Controller a way to call gem5 functions.
*/
class Gem5Connector
{
class Gem5Connector {
public:
void save(const std::string &path);
void restore(const std::string &path);

View File

@ -10,18 +10,16 @@
#include "sim/system.hh"
#include "cpu/pc_event.hh"
class Gem5Breakpoint : public PCEvent
{
class Gem5Breakpoint : public PCEvent {
public:
Gem5Breakpoint(PCEventQueue* queue, Addr ip)
: PCEvent(queue, "Fail* experiment breakpoint", ip) {}
virtual void process(ThreadContext *tc) { fail::simulator.onBreakpoint(&fail::simulator.getCPU(tc->cpuId()), this->evpc, fail::ANY_ADDR); }
: PCEvent(queue, "Fail* experiment breakpoint", ip) { }
virtual void process(ThreadContext *tc)
{ fail::simulator.onBreakpoint(&fail::simulator.getCPU(tc->cpuId()), this->evpc, fail::ANY_ADDR); }
};
aspect Gem5Listener
{
advice "fail::BPSingleListener" : slice class
{
aspect Gem5Listener {
advice "fail::BPSingleListener" : slice class {
private:
Gem5Breakpoint* m_Breakpoint;
public:
@ -35,8 +33,7 @@ aspect Gem5Listener
virtual void onDeletion()
{
if(m_Breakpoint)
{
if (m_Breakpoint) {
delete m_Breakpoint;
m_Breakpoint = 0;
}
@ -44,5 +41,6 @@ aspect Gem5Listener
};
};
#endif
#endif // defined(BUILD_GEM5)
#endif // __GEM5_LISTENER_AH__

View File

@ -18,7 +18,7 @@ namespace fail {
*/
class Gem5MemoryManager : public MemoryManager {
public:
Gem5MemoryManager(System* system) : m_System(system), m_Mem(&system->getPhysMem()) {}
Gem5MemoryManager(System* system) : m_System(system), m_Mem(&system->getPhysMem()) { }
size_t getPoolSize() const { return m_Mem->totalSize(); }
host_address_t getStartAddr() const { return 0; }
@ -64,7 +64,6 @@ public:
m_Mem->functionalAccess(&pkt);
}
private:
System* m_System;
PhysicalMemory* m_Mem;