kfdtest: Re-factor dynamic packet allocation into BasePacket
Avoids unnecessary and error-prone duplication of dynamic packet allocation in many packet classes. Change-Id: Icec981ae2cd7a3d88cdf9213298940d85627f853 Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com>
Tá an tiomantas seo le fáil i:
@@ -38,7 +38,7 @@ enum PACKETTYPE {
|
||||
class BasePacket {
|
||||
public:
|
||||
BasePacket(void);
|
||||
virtual ~BasePacket(void) {}
|
||||
virtual ~BasePacket(void);
|
||||
|
||||
// @returns Packet type
|
||||
virtual PACKETTYPE PacketType() const = 0;
|
||||
@@ -52,7 +52,10 @@ class BasePacket {
|
||||
void Dump() const;
|
||||
|
||||
protected:
|
||||
unsigned int m_FamilyId;
|
||||
unsigned int m_FamilyId;
|
||||
void *m_packetAllocation;
|
||||
|
||||
void *AllocPacket(void);
|
||||
};
|
||||
|
||||
#endif // __KFD_BASE_PACKET__H__
|
||||
|
||||
Tagairt in Eagrán Nua
Cuir bac ar úsáideoir