llvm: hide redefines of atomic sync operations

This commit is contained in:
smlng 2017-02-14 10:53:12 +01:00
parent c0b9b0fb56
commit f4d9972574
2 changed files with 4 additions and 3 deletions

View File

@ -348,7 +348,7 @@ bool __atomic_compare_exchange_c(size_t len, void *ptr, void *expected,
irq_restore(mask);
return ret;
}
#if !defined(__llvm__) && !defined(__clang__)
/* Memory barrier helper function, for platforms without barrier instructions */
void __sync_synchronize(void) __attribute__((__weak__));
void __sync_synchronize(void) {
@ -359,5 +359,5 @@ void __sync_synchronize(void) {
*/
__asm__ volatile ("" : : : "memory");
}
#endif
/** @} */

View File

@ -29,6 +29,7 @@
#include <string.h>
#include "irq.h"
#if !defined(__llvm__) && !defined(__clang__)
/* GCC documentation refers to the types as I1, I2, I4, I8, I16 */
typedef uint8_t I1;
typedef uint16_t I2;
@ -222,5 +223,5 @@ TEMPLATE_SYNC_OP_AND_FETCH_N(nand, &, 1, ~) /* __sync_nand_and_fetch_1 */
TEMPLATE_SYNC_OP_AND_FETCH_N(nand, &, 2, ~) /* __sync_nand_and_fetch_2 */
TEMPLATE_SYNC_OP_AND_FETCH_N(nand, &, 4, ~) /* __sync_nand_and_fetch_4 */
TEMPLATE_SYNC_OP_AND_FETCH_N(nand, &, 8, ~) /* __sync_nand_and_fetch_8 */
#endif
/** @} */