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:
Andreas Hansson
2014-12-02 06:07:36 -05:00
parent 25bfc24999
commit 9779ba2e37
20 changed files with 49 additions and 41 deletions

View File

@@ -469,7 +469,7 @@ AtomicSimpleCPU::writeMem(uint8_t *data, unsigned size,
if (req->isSwap()) {
assert(res);
memcpy(res, pkt.getPtr<uint8_t>(), fullSize);
memcpy(res, pkt.getConstPtr<uint8_t>(), fullSize);
}
}