blob: b374ac85cafb91b5c379d49a7a2cabfa3d085947 [file] [log] [blame]
Brian Silvermanaa9183a2013-12-08 10:33:47 -08001#ifndef CAPE_UTIL_H_
2#define CAPE_UTIL_H_
3
4#define ALIAS_WEAK(f) __attribute__ ((weak, alias (#f)))
5
6// Prevents the compiler from reordering memory operations around this.
7static inline void compiler_memory_barrier(void) {
8 __asm__ __volatile__("" ::: "memory");
9}
10
11#endif // CAPE_UTIL_H_