Brian Silverman | aa9183a | 2013-12-08 10:33:47 -0800 | [diff] [blame^] | 1 | #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. | ||||
7 | static inline void compiler_memory_barrier(void) { | ||||
8 | __asm__ __volatile__("" ::: "memory"); | ||||
9 | } | ||||
10 | |||||
11 | #endif // CAPE_UTIL_H_ |