PebbleOS
Loading...
Searching...
No Matches
Memory barriers

Ordering of memory and device accesses as other bus masters see them. More...

Functions

static void pbl_mb (void)
 Order earlier memory and device accesses before later ones.
 
static void pbl_rmb (void)
 Order earlier memory and device reads before later ones.
 
static void pbl_wmb (void)
 Order earlier memory and device writes before later ones.
 

Detailed Description

Ordering of memory and device accesses as other bus masters see them.

Needed where memory is shared with a DMA engine or another core: after filling a buffer and before the register write that starts the device, and after reading the register that says it is done and before reading what it wrote. Each barrier also stops the compiler from moving memory accesses across it.

Function Documentation

◆ pbl_mb()

static void pbl_mb ( void  )
static

Order earlier memory and device accesses before later ones.

◆ pbl_rmb()

static void pbl_rmb ( void  )
static

Order earlier memory and device reads before later ones.

◆ pbl_wmb()

static void pbl_wmb ( void  )
static

Order earlier memory and device writes before later ones.