Add more memory barriers to avoid code re-ordering issues with DMA (#155)

* Add more memory barriers to avoid code re-ordering issues with DMA

* Comment typos

* Fix Wstrict-prototype on __compiler_memory_barrier

* Remove now-redundant __compiler_barrier macro from hardware_flash

Co-authored-by: Luke Wren <wren6991@gmail.com>
This commit is contained in:
Graham Sanderson
2021-02-19 07:11:56 -06:00
committed by graham sanderson
parent 4b7ffd71f0
commit 0732d0c2a3
5 changed files with 100 additions and 28 deletions

View File

@ -126,11 +126,13 @@ void *decode_host_safe_hw_ptr(uint32_t ptr);
typedef unsigned int uint;
inline static int32_t __mul_instruction(int32_t a,int32_t b)
static inline int32_t __mul_instruction(int32_t a,int32_t b)
{
return a*b;
}
static inline void __compiler_memory_barrier(void) {
}
#ifdef __cplusplus
}
#endif