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:
Felix Kuehling
2019-10-30 20:20:05 -04:00
tuismitheoir 12e4ea94f1
tiomantas ea7619c929
D'athraigh 6 comhad le 46 breiseanna agus 65 scriosta
+5 -2
Féach ar an gComhad
@@ -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__