Skip to content

Commit

Permalink
Use volatile pointers to copy data from MMIO
Browse files Browse the repository at this point in the history
  • Loading branch information
TomTheBear committed Sep 17, 2024
1 parent ebfd73b commit 2811905
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/intel_perfmon_uncore_discovery.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ struct pci_dev {

static void mymemcpy(void* dest, void* src, int size)
{
uint8_t* udest = (uint8_t*)dest;
uint8_t* usrc = (uint8_t*)src;
uint8_t volatile* udest = (uint8_t*)dest;
uint8_t volatile* usrc = (uint8_t*)src;
for (int i = 0; i < size/sizeof(uint8_t); i++)
{
*(udest + i) = *(usrc + i);
Expand Down

0 comments on commit 2811905

Please sign in to comment.