From 619602ba75000efedb86cca6349e6bf310e11058 Mon Sep 17 00:00:00 2001 From: Jeremy Fitzhardinge Date: Mon, 29 Aug 2011 14:47:58 -0700 Subject: [PATCH] --- yaml --- r: 269554 b: refs/heads/master c: 61e2cd0acc248c14793cefd7e23e209be9e0b70d h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/arch/x86/include/asm/cmpxchg.h | 15 +++++++++++---- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/[refs] b/[refs] index 351ccd345f12..989225c5d69f 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 229855d6f3b40d01a903120c433d75e483a0b06d +refs/heads/master: 61e2cd0acc248c14793cefd7e23e209be9e0b70d diff --git a/trunk/arch/x86/include/asm/cmpxchg.h b/trunk/arch/x86/include/asm/cmpxchg.h index 0d0d9cdd3309..5d3acdf5a7a6 100644 --- a/trunk/arch/x86/include/asm/cmpxchg.h +++ b/trunk/arch/x86/include/asm/cmpxchg.h @@ -1,12 +1,19 @@ #ifndef ASM_X86_CMPXCHG_H #define ASM_X86_CMPXCHG_H +#include #include /* Provides LOCK_PREFIX */ -/* Non-existant functions to indicate usage errors at link time. */ -extern void __xchg_wrong_size(void); -extern void __cmpxchg_wrong_size(void); -extern void __xadd_wrong_size(void); +/* + * Non-existant functions to indicate usage errors at link time + * (or compile-time if the compiler implements __compiletime_error(). + */ +extern void __xchg_wrong_size(void) + __compiletime_error("Bad argument size for xchg"); +extern void __cmpxchg_wrong_size(void) + __compiletime_error("Bad argument size for cmpxchg"); +extern void __xadd_wrong_size(void) + __compiletime_error("Bad argument size for xadd"); /* * Constants for operation sizes. On 32-bit, the 64-bit size it set to