From f58d85128dde9aebb5b161aa51799309d5c16d67 Mon Sep 17 00:00:00 2001 From: Kevin Lim Date: Fri, 14 Jan 2005 18:34:56 -0500 Subject: Fixes so m5 compiles on gcc 3.4, which has much stricter syntax. Most changes come from templated code, which is evaluated slightly differently than in previous versions of gcc. arch/alpha/alpha_linux_process.cc: Alphabetize includes. arch/alpha/vptr.hh: Change the constants that are being used for alpha pagebytes to come from the ISA. base/random.hh: cpu/static_inst.cc: sim/param.cc: Fix up template syntax. base/range.hh: Include iostream for << operator. base/res_list.hh: base/statistics.hh: cpu/simple_cpu/simple_cpu.hh: cpu/static_inst.hh: sim/eventq.hh: sim/param.hh: Fixup for templated code to resolve different scope lookup in gcc 3.4. This defers the lookup of the function/variable until actual instantiation time by making it dependent on the templated class/function. base/trace.cc: Fix call to new. base/trace.hh: Fix up #define to have full path. cpu/base_cpu.cc: Fix up call to new. dev/etherlink.hh: dev/ns_gige.hh: dev/sinic.hh: Fixup for friend class/function declaration. g++ 3.4 no longer allows typedefs to be declared as a friend class. dev/pcidev.hh: Fix up re-definition of access level to params. kern/linux/linux_syscalls.hh: kern/tru64/tru64_syscalls.hh: Fix up header. Fix up template syntax. sim/serialize.cc: Include errno.h. sim/startup.cc: Change startupq. queue was getting destructed before all things had called ~StartupCallback(), which lead to a segfault. This puts startupq in global space, and we allocate it ourselves. Other code may be similar to this and may need changing in the future. sim/syscall_emul.hh: Include cpu/exec_context.hh and sim/process.hh, as forward declarations are no longer sufficient. sim/universe.cc: Include errno.h --HG-- extra : convert_revision : e49d08ee89eb06a28351f02bafc028ca6652d5af --- dev/etherlink.hh | 10 +++++----- dev/ns_gige.hh | 8 ++++---- dev/pcidev.hh | 9 +++++---- dev/sinic.hh | 8 ++++---- 4 files changed, 18 insertions(+), 17 deletions(-) (limited to 'dev') diff --git a/dev/etherlink.hh b/dev/etherlink.hh index e998a006f..d5cd7d7c8 100644 --- a/dev/etherlink.hh +++ b/dev/etherlink.hh @@ -30,13 +30,13 @@ * Device module for modelling a fixed bandwidth full duplex ethernet link */ -#ifndef __ETHERLINK_HH__ -#define __ETHERLINK_HH__ +#ifndef __DEV_ETHERLINK_HH__ +#define __DEV_ETHERLINK_HH__ -#include "sim/host.hh" -#include "sim/eventq.hh" #include "dev/etherint.hh" #include "dev/etherpkt.hh" +#include "sim/eventq.hh" +#include "sim/host.hh" #include "sim/sim_object.hh" class EtherDump; @@ -71,7 +71,7 @@ class EtherLink : public SimObject PacketPtr packet; void txDone(); typedef EventWrapper DoneEvent; - friend class DoneEvent; + friend void DoneEvent::process(); DoneEvent doneEvent; friend class LinkDelayEvent; diff --git a/dev/ns_gige.hh b/dev/ns_gige.hh index 8d6016126..697c39cac 100644 --- a/dev/ns_gige.hh +++ b/dev/ns_gige.hh @@ -262,12 +262,12 @@ class NSGigE : public PciDev void rxKick(); Tick rxKickTick; typedef EventWrapper RxKickEvent; - friend class RxKickEvent; + friend void RxKickEvent::process(); void txKick(); Tick txKickTick; typedef EventWrapper TxKickEvent; - friend class TxKickEvent; + friend void TxKickEvent::process(); /** * Retransmit event @@ -280,7 +280,7 @@ class NSGigE : public PciDev txKick(); } typedef EventWrapper TxEvent; - friend class TxEvent; + friend void TxEvent::process(); TxEvent txEvent; void txDump() const; @@ -315,7 +315,7 @@ class NSGigE : public PciDev void cpuIntrClear(); typedef EventWrapper IntrEvent; - friend class IntrEvent; + friend void IntrEvent::process(); IntrEvent *intrEvent; NSGigEInt *interface; diff --git a/dev/pcidev.hh b/dev/pcidev.hh index 4b947b560..14f183e28 100644 --- a/dev/pcidev.hh +++ b/dev/pcidev.hh @@ -78,10 +78,6 @@ class PciConfigData : public SimObject */ class PciDev : public DmaDevice { - protected: - struct Params; - Params *_params; - public: struct Params { @@ -110,6 +106,11 @@ class PciDev : public DmaDevice /** The function number */ uint32_t functionNum; }; + + protected: + Params *_params; + + public: const Params *params() const { return _params; } protected: diff --git a/dev/sinic.hh b/dev/sinic.hh index ef515ffad..9f265b3f6 100644 --- a/dev/sinic.hh +++ b/dev/sinic.hh @@ -59,7 +59,7 @@ class Base : public PciDev void cpuIntrClear(); typedef EventWrapper IntrEvent; - friend class IntrEvent; + friend void IntrEvent::process(); IntrEvent *intrEvent; Interface *interface; @@ -155,12 +155,12 @@ class Device : public Base void rxKick(); Tick rxKickTick; typedef EventWrapper RxKickEvent; - friend class RxKickEvent; + friend void RxKickEvent::process(); void txKick(); Tick txKickTick; typedef EventWrapper TxKickEvent; - friend class TxKickEvent; + friend void TxKickEvent::process(); /** * Retransmit event @@ -173,7 +173,7 @@ class Device : public Base txKick(); } typedef EventWrapper TxEvent; - friend class TxEvent; + friend void TxEvent::process(); TxEvent txEvent; void txDump() const; -- cgit v1.2.3