After writing to mapped_rw, we should also check if the backing buffer has the correct data. Or we could have a situation where on systems that need explicit cache controls, the newly updated mapped_rw is cached but the backing buffer still contain old data. Comparing the backing buffer to mapped_ro does not really matter in this case as the content would certain match. Also, this moves the mapping of mapped_ro earlier so that we map both mapped_rw and mapped_ro because data manipulation. And that we also need to verify the values of the backing and mapped buffers. Signed-off-by: Daniel Leung <daniel.leung@intel.com> |
||
|---|---|---|
| .. | ||
| main.c | ||