mem: Add const getters for write packet data
This patch takes a first step in tightening up how we use the data pointer in write packets. A const getter is added for the pointer itself (getConstPtr), and a number of member functions are also made const accordingly. In a range of places throughout the memory system the new member is used. The patch also removes the unused isReadWrite function.
This commit is contained in:
@@ -388,7 +388,7 @@ DefaultFetch<Impl>::processCacheCompletion(PacketPtr pkt)
|
||||
return;
|
||||
}
|
||||
|
||||
memcpy(fetchBuffer[tid], pkt->getPtr<uint8_t>(), fetchBufferSize);
|
||||
memcpy(fetchBuffer[tid], pkt->getConstPtr<uint8_t>(), fetchBufferSize);
|
||||
fetchBufferValid[tid] = true;
|
||||
|
||||
// Wake up the CPU (if it went to sleep and was waiting on
|
||||
|
||||
Reference in New Issue
Block a user