misc: Substitute pointer to Request with aliased RequestPtr
Every usage of Request* in the code has been replaced with the RequestPtr alias. This is a preparing patch for when RequestPtr will be the typdefed to a smart pointer to Request rather then a raw pointer to Request. Change-Id: I73cbaf2d96ea9313a590cdc731a25662950cd51a Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com> Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com> Reviewed-on: https://gem5-review.googlesource.com/10995 Reviewed-by: Anthony Gutierrez <anthony.gutierrez@amd.com> Reviewed-by: Daniel Carvalho <odanrc@yahoo.com.br> Maintainer: Anthony Gutierrez <anthony.gutierrez@amd.com>
This commit is contained in:
@@ -331,7 +331,7 @@ AtomicSimpleCPU::readMem(Addr addr, uint8_t * data, unsigned size,
|
||||
SimpleThread* thread = t_info.thread;
|
||||
|
||||
// use the CPU's statically allocated read request and packet objects
|
||||
Request *req = &data_read_req;
|
||||
RequestPtr req = &data_read_req;
|
||||
|
||||
if (traceData)
|
||||
traceData->setMem(addr, size, flags);
|
||||
@@ -435,7 +435,7 @@ AtomicSimpleCPU::writeMem(uint8_t *data, unsigned size, Addr addr,
|
||||
}
|
||||
|
||||
// use the CPU's statically allocated write request and packet objects
|
||||
Request *req = &data_write_req;
|
||||
RequestPtr req = &data_write_req;
|
||||
|
||||
if (traceData)
|
||||
traceData->setMem(addr, size, flags);
|
||||
|
||||
@@ -468,7 +468,7 @@ BaseSimpleCPU::checkForInterrupts()
|
||||
|
||||
|
||||
void
|
||||
BaseSimpleCPU::setupFetchRequest(Request *req)
|
||||
BaseSimpleCPU::setupFetchRequest(RequestPtr req)
|
||||
{
|
||||
SimpleExecContext &t_info = *threadInfo[curThread];
|
||||
SimpleThread* thread = t_info.thread;
|
||||
|
||||
@@ -129,7 +129,7 @@ class BaseSimpleCPU : public BaseCPU
|
||||
|
||||
|
||||
void checkForInterrupts();
|
||||
void setupFetchRequest(Request *req);
|
||||
void setupFetchRequest(RequestPtr req);
|
||||
void preExecute();
|
||||
void postExecute();
|
||||
void advancePC(const Fault &fault);
|
||||
|
||||
@@ -620,7 +620,7 @@ TimingSimpleCPU::fetch()
|
||||
|
||||
if (needToFetch) {
|
||||
_status = BaseSimpleCPU::Running;
|
||||
Request *ifetch_req = new Request();
|
||||
RequestPtr ifetch_req = new Request();
|
||||
ifetch_req->taskId(taskId());
|
||||
ifetch_req->setContext(thread->contextId());
|
||||
setupFetchRequest(ifetch_req);
|
||||
|
||||
Reference in New Issue
Block a user