util: add full memory barrier fallback

This commit is contained in:
Christian Hergert
2016-08-23 10:08:37 -07:00
parent 65851f529c
commit 1c1ef02b3d

View File

@ -33,4 +33,12 @@
#define read_barrier() asm volatile("dsb" ::: "memory")
#endif
/*
* Fallback to a full memory barrier if the architecture is not yet
* supported with a lighter read barrier.
*/
#ifndef read_barrier
#define read_barrier() __sync_synchronize()
#endif
#endif /* SP_UTIL_H */