lkml.org 
[lkml]   [2006]   [Jul]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] consistently use MAX_ERRNO in __syscall_return
Andrew Morton wrote:
> On Sun, 2 Jul 2006 11:27:22 -0700
> "Randy.Dunlap" <rdunlap@xenotime.net> wrote:
>
>> --- linux-2617-g20.orig/include/asm-i386/unistd.h
>> +++ linux-2617-g20/include/asm-i386/unistd.h
>> @@ -327,14 +327,15 @@
>> #ifdef __KERNEL__
>>
>> #define NR_syscalls 318
>> +#include <linux/err.h>
>
> include/linux/err.h: Assembler messages:
> include/linux/err.h:20: Error: no such instruction: `static inline void *ERR_PTR(long error)'
> include/linux/err.h:21: Error: junk at end of line, first unrecognized character is `{'
> include/linux/err.h:22: Error: no such instruction: `return (void *)error'
> include/linux/err.h:23: Error: junk at end of line, first unrecognized character is `}'
> include/linux/err.h:25: Error: no such instruction: `static inline long PTR_ERR(const void *ptr)'
> include/linux/err.h:26: Error: junk at end of line, first unrecognized character is `{'
> include/linux/err.h:27: Error: no such instruction: `return (long)ptr'
> include/linux/err.h:28: Error: junk at end of line, first unrecognized character is `}'
> include/linux/err.h:30: Error: no such instruction: `static inline long IS_ERR(const void *ptr)'
> include/linux/err.h:31: Error: junk at end of line, first unrecognized character is `{'
> include/linux/err.h:32: Error: no such instruction: `return unlikely(((unsigned long)ptr)>=(unsigned long)-4095)'
> include/linux/err.h:33: Error: junk at end of line, first unrecognized character is `}'
> distcc[7619] ERROR: compile (null) on localhost failed
> make[1]: *** [arch/i386/kernel/vsyscall-sysenter.o] Error 1
> make: *** [arch/i386/kernel/vsyscall-sysenter.o] Error 2

unlikely() shouldn't be used in code exported to user space. At least
one architecture simply open-codes the __builtin_expect(); or we could
introduce __likely() and __unlikely() for the benefit of userspace.

-hpa
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-07-03 17:07    [W:0.109 / U:0.036 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site