PacketPtr and PacketReq aren't reference counting. We just starting  
using them incase we wanted reference counting pointers. Looking at  
the code we do a reasonably job of using PacketPtr everywhere, but  
RequestPtr is used maybe 40% of the time.

Ali

On Aug 24, 2008, at 3:20 PM, Gabe Black wrote:

> nathan binkert wrote:
>>> Is there a way to forward declare a typedef? We used PacketPtr and
>>> RequestPtr all over the place in header files which requires  
>>> including
>>> packet.hh and request.hh. However, in many cases the only reason we
>>> need to include the header files is because of the typedef.
>>>
>>
>> There is no way to forward declare a typedef, though you can just
>> define the typedef twice.  We could create a file like
>> src/mem/forward.hh and stick the few typedefs that we need in it.
>>
>> iosfwd from the standard library is an example of this sort of file.
>>
>>  Nate
>> _______________________________________________
>> m5-dev mailing list
>> [email protected]
>> http://m5sim.org/mailman/listinfo/m5-dev
>>
>
> I may be mangling this a little since I haven't looked at it in a  
> while,
> but I think there's a basically unbreakable string of dependencies
> between, for instance, PacketPtr and the Packet class, namely  
> PacketPtr
> typedef => PacketPtr reference counting pointer => Packet class. I  
> think
> it's pretty much reduced to just those elements as is, so all you'd be
> doing is moving it around. Can you forward declare the reference
> counting pointer class and then use it in a typedef? I was under the
> impression you couldn't.
>
> Gabe
> _______________________________________________
> m5-dev mailing list
> [email protected]
> http://m5sim.org/mailman/listinfo/m5-dev
>

_______________________________________________
m5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/m5-dev

Reply via email to