This commit was manufactured by cvs2svn to create tag
[linux-2.6.git] / include / asm-mips / unistd.h
index 4b0c210..7c5a300 100644 (file)
 #define __NR_mq_notify                 (__NR_Linux + 275)
 #define __NR_mq_getsetattr             (__NR_Linux + 276)
 #define __NR_vserver                   (__NR_Linux + 277)
-#define __NR_waitid                    (__NR_Linux + 278)
-/* #define __NR_sys_setaltroot         (__NR_Linux + 279) */
-#define __NR_add_key                   (__NR_Linux + 280)
-#define __NR_request_key               (__NR_Linux + 281)
-#define __NR_keyctl                    (__NR_Linux + 282)
 
 /*
  * Offset of the last Linux o32 flavoured syscall
  */
-#define __NR_Linux_syscalls            282
+#define __NR_Linux_syscalls            277
 
 #endif /* _MIPS_SIM == _MIPS_SIM_ABI32 */
 
 #define __NR_O32_Linux                 4000
-#define __NR_O32_Linux_syscalls                282
+#define __NR_O32_Linux_syscalls                277
 
 #if _MIPS_SIM == _MIPS_SIM_ABI64
 
 #define __NR_mq_notify                 (__NR_Linux + 234)
 #define __NR_mq_getsetattr             (__NR_Linux + 235)
 #define __NR_vserver                   (__NR_Linux + 236)
-#define __NR_waitid                    (__NR_Linux + 237)
-/* #define __NR_sys_setaltroot         (__NR_Linux + 238) */
-#define __NR_add_key                   (__NR_Linux + 239)
-#define __NR_request_key               (__NR_Linux + 240)
-#define __NR_keyctl                    (__NR_Linux + 241)
 
 /*
- * Offset of the last Linux 64-bit flavoured syscall
+ * Offset of the last Linux flavoured syscall
  */
-#define __NR_Linux_syscalls            241
+#define __NR_Linux_syscalls            236
 
 #endif /* _MIPS_SIM == _MIPS_SIM_ABI64 */
 
 #define __NR_64_Linux                  5000
-#define __NR_64_Linux_syscalls         241
+#define __NR_64_Linux_syscalls         236
 
 #if _MIPS_SIM == _MIPS_SIM_NABI32
 
 #define __NR_mq_notify                 (__NR_Linux + 238)
 #define __NR_mq_getsetattr             (__NR_Linux + 239)
 #define __NR_vserver                   (__NR_Linux + 240)
-#define __NR_waitid                    (__NR_Linux + 241)
-/* #define __NR_sys_setaltroot         (__NR_Linux + 242) */
-#define __NR_add_key                   (__NR_Linux + 243)
-#define __NR_request_key               (__NR_Linux + 244)
-#define __NR_keyctl                    (__NR_Linux + 245)
 
 /*
  * Offset of the last N32 flavoured syscall
  */
-#define __NR_Linux_syscalls            245
+#define __NR_Linux_syscalls            240
 
 #endif /* _MIPS_SIM == _MIPS_SIM_NABI32 */
 
 #define __NR_N32_Linux                 6000
-#define __NR_N32_Linux_syscalls                245
+#define __NR_N32_Linux_syscalls                240
 
 #ifndef __ASSEMBLY__
 
@@ -853,13 +838,12 @@ type name(void) \
        ".set\treorder" \
        : "=&r" (__v0), "=r" (__a3) \
        : "i" (__NR_##name) \
-       : "$2", "$8", "$9", "$10", "$11", "$12", "$13", "$14", "$15", "$24", \
-         "memory"); \
+       : "$2", "$8", "$9", "$10", "$11", "$12", "$13", "$14", "$15", "$24"); \
        \
        if (__a3 == 0) \
                return (type) __v0; \
        errno = __v0; \
-       return (type) -1; \
+       return -1; \
 }
 
 /*
@@ -881,13 +865,12 @@ type name(atype a) \
        ".set\treorder" \
        : "=&r" (__v0), "=r" (__a3) \
        : "r" (__a0), "i" (__NR_##name) \
-       : "$2", "$8", "$9", "$10", "$11", "$12", "$13", "$14", "$15", "$24", \
-         "memory"); \
+       : "$2", "$8", "$9", "$10", "$11", "$12", "$13", "$14", "$15", "$24"); \
        \
        if (__a3 == 0) \
                return (type) __v0; \
        errno = __v0; \
-       return (type) -1; \
+       return -1; \
 }
 
 #define _syscall2(type,name,atype,a,btype,b) \
@@ -906,13 +889,12 @@ type name(atype a, btype b) \
        ".set\treorder" \
        : "=&r" (__v0), "=r" (__a3) \
        : "r" (__a0), "r" (__a1), "i" (__NR_##name) \
-       : "$2", "$8", "$9", "$10", "$11", "$12", "$13", "$14", "$15", "$24", \
-         "memory"); \
+       : "$2", "$8", "$9", "$10", "$11", "$12", "$13", "$14", "$15", "$24"); \
        \
        if (__a3 == 0) \
                return (type) __v0; \
        errno = __v0; \
-       return (type) -1; \
+       return -1; \
 }
 
 #define _syscall3(type,name,atype,a,btype,b,ctype,c) \
@@ -932,13 +914,12 @@ type name(atype a, btype b, ctype c) \
        ".set\treorder" \
        : "=&r" (__v0), "=r" (__a3) \
        : "r" (__a0), "r" (__a1), "r" (__a2), "i" (__NR_##name) \
-       : "$2", "$8", "$9", "$10", "$11", "$12", "$13", "$14", "$15", "$24", \
-         "memory"); \
+       : "$2", "$8", "$9", "$10", "$11", "$12", "$13", "$14", "$15", "$24"); \
        \
        if (__a3 == 0) \
                return (type) __v0; \
        errno = __v0; \
-       return (type) -1; \
+       return -1; \
 }
 
 #define _syscall4(type,name,atype,a,btype,b,ctype,c,dtype,d) \
@@ -958,13 +939,12 @@ type name(atype a, btype b, ctype c, dtype d) \
        ".set\treorder" \
        : "=&r" (__v0), "+r" (__a3) \
        : "r" (__a0), "r" (__a1), "r" (__a2), "i" (__NR_##name) \
-       : "$2", "$8", "$9", "$10", "$11", "$12", "$13", "$14", "$15", "$24", \
-         "memory"); \
+       : "$2", "$8", "$9", "$10", "$11", "$12", "$13", "$14", "$15", "$24"); \
        \
        if (__a3 == 0) \
                return (type) __v0; \
        errno = __v0; \
-       return (type) -1; \
+       return -1; \
 }
 
 #if (_MIPS_SIM == _MIPS_SIM_ABI32)
@@ -995,13 +975,12 @@ type name(atype a, btype b, ctype c, dtype d, etype e) \
        : "=&r" (__v0), "+r" (__a3) \
        : "r" (__a0), "r" (__a1), "r" (__a2), "i" (__NR_##name), \
          "m" ((unsigned long)e) \
-       : "$2", "$8", "$9", "$10", "$11", "$12", "$13", "$14", "$15", "$24", \
-         "memory"); \
+       : "$2", "$8", "$9", "$10", "$11", "$12", "$13", "$14", "$15", "$24"); \
        \
        if (__a3 == 0) \
                return (type) __v0; \
        errno = __v0; \
-       return (type) -1; \
+       return -1; \
 }
 
 #define _syscall6(type,name,atype,a,btype,b,ctype,c,dtype,d,etype,e,ftype,f) \
@@ -1028,13 +1007,12 @@ type name(atype a, btype b, ctype c, dtype d, etype e, ftype f) \
        : "=&r" (__v0), "+r" (__a3) \
        : "r" (__a0), "r" (__a1), "r" (__a2), "i" (__NR_##name), \
          "m" ((unsigned long)e), "m" ((unsigned long)f) \
-       : "$2", "$8", "$9", "$10", "$11", "$12", "$13", "$14", "$15", "$24", \
-         "memory"); \
+       : "$2", "$8", "$9", "$10", "$11", "$12", "$13", "$14", "$15", "$24"); \
        \
        if (__a3 == 0) \
                return (type) __v0; \
        errno = __v0; \
-       return (type) -1; \
+       return -1; \
 }
 
 #endif /* (_MIPS_SIM == _MIPS_SIM_ABI32) */
@@ -1057,15 +1035,14 @@ type name (atype a,btype b,ctype c,dtype d,etype e) \
        "syscall\n\t" \
        "move\t%0, $2\n\t" \
        ".set\treorder" \
-       : "=&r" (__v0), "+r" (__a3) \
-       : "r" (__a0), "r" (__a1), "r" (__a2), "r" (__a4), "i" (__NR_##name) \
-       : "$2", "$9", "$10", "$11", "$12", "$13", "$14", "$15", "$24", \
-         "memory"); \
+       : "=&r" (__v0), "+r" (__a3), "+r" (__a4) \
+       : "r" (__a0), "r" (__a1), "r" (__a2), "i" (__NR_##name) \
+       : "$2","$9", "$10", "$11", "$12", "$13", "$14", "$15", "$24"); \
        \
        if (__a3 == 0) \
                return (type) __v0; \
        errno = __v0; \
-       return (type) -1; \
+       return -1; \
 }
 
 #define _syscall6(type,name,atype,a,btype,b,ctype,c,dtype,d,etype,e,ftype,f) \
@@ -1088,13 +1065,12 @@ type name (atype a,btype b,ctype c,dtype d,etype e,ftype f) \
        : "=&r" (__v0), "+r" (__a3) \
        : "r" (__a0), "r" (__a1), "r" (__a2), "r" (__a4), "r" (__a5), \
          "i" (__NR_##name) \
-       : "$2", "$9", "$10", "$11", "$12", "$13", "$14", "$15", "$24", \
-         "memory"); \
+       : "$2","$9", "$10", "$11", "$12", "$13", "$14", "$15", "$24"); \
        \
        if (__a3 == 0) \
                return (type) __v0; \
        errno = __v0; \
-       return (type) -1; \
+       return -1; \
 }
 
 #endif /* (_MIPS_SIM == _MIPS_SIM_NABI32) || (_MIPS_SIM == _MIPS_SIM_ABI64) */
@@ -1144,7 +1120,21 @@ type name (atype a,btype b,ctype c,dtype d,etype e,ftype f) \
  * won't be any messing with the stack from main(), but we define
  * some others too.
  */
+static inline _syscall0(pid_t,setsid)
+static inline _syscall3(int,write,int,fd,const char *,buf,off_t,count)
+static inline _syscall3(int,read,int,fd,char *,buf,off_t,count)
+static inline _syscall3(off_t,lseek,int,fd,off_t,offset,int,count)
+static inline _syscall1(int,dup,int,fd)
 static inline _syscall3(int,execve,const char *,file,char **,argv,char **,envp)
+static inline _syscall3(int,open,const char *,file,int,flag,int,mode)
+static inline _syscall1(int,close,int,fd)
+struct rusage;
+static inline _syscall4(pid_t,wait4,pid_t,pid,int *,stat_addr,int,options,struct rusage *,ru)
+
+static inline pid_t waitpid(int pid, int * wait_stat, int flags)
+{
+       return wait4(pid, wait_stat, flags, NULL);
+}
 
 asmlinkage unsigned long sys_mmap(
                                unsigned long addr, size_t len,