};
#define __hp(x) ((struct __uatomic_dummy *)(x))
-#define _uatomic_set(addr, v) CMM_STORE_SHARED(*(addr), (v))
+#define _uatomic_set(addr, v) ((void) CMM_STORE_SHARED(*(addr), (v)))
/* cmpxchg */
}
#endif
}
- /* generate an illegal instruction. Cannot catch this with linker tricks
- * when optimizations are disabled. */
+ /*
+ * generate an illegal instruction. Cannot catch this with
+ * linker tricks when optimizations are disabled.
+ */
__asm__ __volatile__("ud2");
return 0;
}
}
#endif
}
- /* generate an illegal instruction. Cannot catch this with linker tricks
- * when optimizations are disabled. */
+ /*
+ * generate an illegal instruction. Cannot catch this with
+ * linker tricks when optimizations are disabled.
+ */
__asm__ __volatile__("ud2");
return 0;
}
}
#endif
}
- /* generate an illegal instruction. Cannot catch this with linker tricks
- * when optimizations are disabled. */
+ /*
+ * generate an illegal instruction. Cannot catch this with
+ * linker tricks when optimizations are disabled.
+ */
__asm__ __volatile__("ud2");
return 0;
}
}
#endif
}
- /* generate an illegal instruction. Cannot catch this with linker tricks
- * when optimizations are disabled. */
+ /*
+ * generate an illegal instruction. Cannot catch this with
+ * linker tricks when optimizations are disabled.
+ */
__asm__ __volatile__("ud2");
return;
}
}
#endif
}
- /* generate an illegal instruction. Cannot catch this with linker tricks
- * when optimizations are disabled. */
+ /*
+ * generate an illegal instruction. Cannot catch this with
+ * linker tricks when optimizations are disabled.
+ */
__asm__ __volatile__("ud2");
return;
}
}
#endif
}
- /* generate an illegal instruction. Cannot catch this with linker tricks
- * when optimizations are disabled. */
+ /*
+ * generate an illegal instruction. Cannot catch this with
+ * linker tricks when optimizations are disabled.
+ */
__asm__ __volatile__("ud2");
return;
}
}
#endif
}
- /* generate an illegal instruction. Cannot catch this with linker tricks
- * when optimizations are disabled. */
+ /*
+ * generate an illegal instruction. Cannot catch this with
+ * linker tricks when optimizations are disabled.
+ */
__asm__ __volatile__("ud2");
return;
}
: (compat_uatomic_##insn)) \
: (compat_uatomic_##insn))))
+/*
+ * We leave the return value so we don't break the ABI, but remove the
+ * return value from the API.
+ */
extern unsigned long _compat_uatomic_set(void *addr,
unsigned long _new, int len);
#define compat_uatomic_set(addr, _new) \
- ((__typeof__(*(addr))) _compat_uatomic_set((addr), \
- caa_cast_long_keep_sign(_new), \
- sizeof(*(addr))))
+ ((void) _compat_uatomic_set((addr), \
+ caa_cast_long_keep_sign(_new), \
+ sizeof(*(addr))))
extern unsigned long _compat_uatomic_xchg(void *addr,