toolchain: xtensa: Define __sync_synchronize
This builtin gcc function is not available in xcc compiler. Adding a memory compiler barrier as it is done in compiler_barrier. compiler_barrier() and __sync_synchronize() are not the same, the former is a sw barrier while the latter can be a hw barrier like (mfence/sfence) in X86. I didn't find anything equivalent for xtensa so just implementing a SW barrier. Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
This commit is contained in:
parent
ffa1532be2
commit
87b4759663
1 changed files with 4 additions and 0 deletions
|
|
@ -144,6 +144,10 @@
|
|||
#define __builtin_unreachable() do { __ASSERT(false, "Unreachable code"); } \
|
||||
while (true)
|
||||
|
||||
/* Not a full barrier, just a SW barrier */
|
||||
#define __sync_synchronize() do { __asm__ __volatile__ ("" ::: "memory"); } \
|
||||
while (false)
|
||||
|
||||
#ifdef __deprecated
|
||||
/*
|
||||
* XCC does not support using deprecated attribute in enum,
|
||||
|
|
|
|||
Loading…
Reference in a new issue