projects
/
urcu.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
doc/examples: cds_lfht_add_replace
[urcu.git]
/
urcu
/
uatomic
/
x86.h
diff --git
a/urcu/uatomic/x86.h
b/urcu/uatomic/x86.h
index c55ac4e49c667a8d45df3654acb047d48bd1c5e2..a139228346cb64b5eed2425f0d71f8f78f58e9dc 100644
(file)
--- a/
urcu/uatomic/x86.h
+++ b/
urcu/uatomic/x86.h
@@
-39,7
+39,7
@@
struct __uatomic_dummy {
};
#define __hp(x) ((struct __uatomic_dummy *)(x))
};
#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 */
/* cmpxchg */
@@
-95,8
+95,10
@@
unsigned long __uatomic_cmpxchg(void *addr, unsigned long old,
}
#endif
}
}
#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;
}
__asm__ __volatile__("ud2");
return 0;
}
@@
-157,8
+159,10
@@
unsigned long __uatomic_exchange(void *addr, unsigned long val, int len)
}
#endif
}
}
#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;
}
__asm__ __volatile__("ud2");
return 0;
}
@@
-222,8
+226,10
@@
unsigned long __uatomic_add_return(void *addr, unsigned long val,
}
#endif
}
}
#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;
}
__asm__ __volatile__("ud2");
return 0;
}
@@
-278,8
+284,10
@@
void __uatomic_and(void *addr, unsigned long val, int len)
}
#endif
}
}
#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;
}
__asm__ __volatile__("ud2");
return;
}
@@
-332,8
+340,10
@@
void __uatomic_or(void *addr, unsigned long val, int len)
}
#endif
}
}
#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;
}
__asm__ __volatile__("ud2");
return;
}
@@
-386,8
+396,10
@@
void __uatomic_add(void *addr, unsigned long val, int len)
}
#endif
}
}
#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;
}
__asm__ __volatile__("ud2");
return;
}
@@
-494,8
+506,10
@@
void __uatomic_dec(void *addr, int len)
}
#endif
}
}
#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;
}
__asm__ __volatile__("ud2");
return;
}
@@
-515,12
+529,16
@@
extern int __rcu_cas_init(void);
: (compat_uatomic_##insn)) \
: (compat_uatomic_##insn))))
: (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) \
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,
extern unsigned long _compat_uatomic_xchg(void *addr,
This page took
0.025958 seconds
and
4
git commands to generate.