Guan Xuetao<gxt@xxxxxxxxxxxxxxx> wrote:That's great. It's just what I want to do.
Disintegrate asm/system.h for Unicore32. (Compilation successful)Aha! Much better. It mostly looks reasonable, apart from one thing. See the
The implementation details are not changed, but only splitted.
BTW, some codestyles are adjusted.
Signed-off-by: David Howells<dhowells@xxxxxxxxxx>
Signed-off-by: Guan Xuetao<gxt@xxxxxxxxxxxxxxx>
attached patch, which I'll roll in if you're happy with it.
-extern void panic(const char *fmt, ...);A semicolon should be added at the end.
+/*
+ * Generate a link failure on undefined symbol if the pointer points to a value
+ * of unsupported size.
+ */
+extern void __xchg_bad_pointer(void)
static inline unsigned long __xchg(unsigned long x, volatile void *ptr,I think the 'break' sentence is redundant.
int size)
@@ -31,8 +35,8 @@ static inline unsigned long __xchg(unsigned long x, volatile void *ptr,
: "memory", "cc");
break;
default:
- panic("xchg: bad data size: ptr 0x%p, size %d\n",
- ptr, size);
+ __xchg_bad_pointer();
+ break;