Merge git://oss.sgi.com:8090/xfs/xfs-2.6
[powerpc.git] / include / asm-i386 / unistd.h
index d983b74..bd99870 100644 (file)
 #define __NR_tee               315
 #define __NR_vmsplice          316
 #define __NR_move_pages                317
+#define __NR_getcpu            318
 
-#define NR_syscalls 318
+#ifdef __KERNEL__
+
+#define NR_syscalls 319
+#include <linux/err.h>
 
 /*
- * user-visible error numbers are in the range -1 - -128: see
+ * user-visible error numbers are in the range -1 - -MAX_ERRNO: see
  * <asm-i386/errno.h>
  */
 #define __syscall_return(type, res) \
 do { \
-       if ((unsigned long)(res) >= (unsigned long)(-(128 + 1))) { \
+       if ((unsigned long)(res) >= (unsigned long)(-MAX_ERRNO)) { \
                errno = -(res); \
                res = -1; \
        } \
@@ -423,8 +427,6 @@ __asm__ volatile ("push %%ebp ; push %%ebx ; movl 4(%2),%%ebp ; " \
 __syscall_return(type,__res); \
 }
 
-#ifdef __KERNEL__
-
 #define __ARCH_WANT_IPC_PARSE_VERSION
 #define __ARCH_WANT_OLD_READDIR
 #define __ARCH_WANT_OLD_STAT