unistd.h cleanups
PATCH 1/1 unistd.h cleanups
This patch removes the stubs for syscalls that are not used from the kernel anymore.
--
Brian Gerst
include/asm-alpha/unistd.h +0 -23
@@ -533,12 +533,6 @@#include <linux/signal.h> #include <asm/ptrace.h> -extern void sys_idle (void ); -static inline void idle (void ) -{ -sys_idle (); -} -extern long sys_open (const char *,int ,int );static inline long open (const char * name,int mode,int flags) {
@@ -597,12 +591,6 @@return sys_setsid (); } -extern long sys_sync (void ); -static inline long sync (void ) -{ -return sys_sync (); -} -struct rusage ;extern asmlinkage long sys_wait4 (pid_t ,unsigned int *,int ,struct rusage *);static inline pid_t waitpid (int pid,int * wait_stat,int flags)
@@ -610,17 +598,6 @@ return sys_wait4(pid, wait_stat, flags, NULL); } -static inline pid_t wait (int * wait_stat) -{ -return waitpid (-1 ,wait_stat,0 ); -} - -extern long sys_delete_module (const char *name); -static inline long delete_module (const char *name) -{ -return sys_delete_module (name); -} -#endif /*
include/asm-arm/unistd.h +0 -29
@@ -403,24 +403,6 @@struct rusage ;asmlinkage long sys_wait4 (pid_t pid,unsigned int * stat_addr,int options,struct rusage * ru); -static inline long idle (void ) -{ -extern long sys_idle (void ); -return sys_idle (); -} - -static inline long pause (void ) -{ -extern long sys_pause (void ); -return sys_pause (); -} - -static inline long sync (void ) -{ -extern long sys_sync (void ); -return sys_sync (); -} -static inline pid_t setsid (void ) {extern long sys_setsid (void );
@@ -474,17 +456,6 @@return sys_wait4 ((int )pid, wait_stat, options,NULL ); } -static inline long delete_module (const char *name) -{ -extern long sys_delete_module (const char *name); -return sys_delete_module (name); -} - -static inline pid_t wait (int * wait_stat) -{ -return sys_wait4 (-1 , wait_stat,0 ,NULL ); -} -/* * The following two can't be eliminated yet - they rely on * specific conditions.
include/asm-cris/unistd.h +0 -14
@@ -365,12 +365,6 @@* some others too. */ #define __NR__exit __NR_exit -static inline _syscall0(int,idle) -static inline _syscall0(int,fork) -static inline _syscall2(int,clone,unsigned long,flags,char *,esp) -static inline _syscall0(int,pause) -static inline _syscall0(int,setup) -static inline _syscall0(int,sync) static inline _syscall0(pid_t,setsid) static inline _syscall3(int,write,int,fd,const char *,buf,off_t,count) static inline _syscall1(int,dup,int,fd)
@@ -384,14 +378,6 @@/* the following are just while developing the elinux port! */ static inline _syscall3(int,read,int,fd,char *,buf,off_t,count) -static inline _syscall2 (int ,socketcall ,int ,call ,unsigned long *,args ) -static inline _syscall3(int,ioctl,unsigned int,fd,unsigned int,cmd,unsigned long,arg) -static inline _syscall5(int,mount,const char *,a,const char *,b,const char *,c,unsigned long,rwflag,const void *,data) - -static inline pid_twait (int * wait_stat) -{ -return waitpid (-1 ,wait_stat,0 ); -}#endif
include/asm-i386/unistd.h +0 -8
@@ -362,8 +362,6 @@* some others too. */ #define __NR__exit __NR_exit -static inline _syscall0(int,pause) -static inline _syscall0(int,sync) 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)
@@ -374,12 +372,6 @@ static inline _syscall1(int,close,int,fd) static inline _syscall1(int,_exit,int,exitcode) static inline _syscall3(pid_t,waitpid,pid_t,pid,int *,wait_stat,int,options) -static inline _syscall1(int,delete_module,const char *,name) - -static inline pid_twait (int * wait_stat) -{ -return waitpid (-1 ,wait_stat,0 ); -}#endif
include/asm-ia64/unistd.h +0 -8
@@ -309,7 +309,6 @@struct rusage ; -static inline _syscall0(int,sync) 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)
@@ -319,7 +318,6 @@ static inline _syscall3(int,open,const char *,file,int,flag,int,mode) static inline _syscall1(int,close,int,fd) static inline _syscall4(pid_t,wait4,pid_t,pid,int *,wait_stat,int,options,struct rusage*, rusage) -static inline _syscall1(int,delete_module,const char *,name) static inline _syscall2(pid_t,clone,unsigned long,flags,void*,sp); #define __NR__exit __NR_exit
@@ -331,12 +329,6 @@ return wait4(pid, wait_stat, flags, NULL); } -static inline pid_t -wait (int * wait_stat) -{ -return wait4 (-1 , wait_stat,0 ,0 ); -} -#endif /* __KERNEL_SYSCALLS__ */ /*
include/asm-m68k/unistd.h +0 -8
@@ -350,8 +350,6 @@* some others too. */ #define __NR__exit __NR_exit -static inline _syscall0(int,pause) -static inline _syscall0(int,sync) 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)
@@ -362,12 +360,6 @@ static inline _syscall1(int,close,int,fd) static inline _syscall1(int,_exit,int,exitcode) static inline _syscall3(pid_t,waitpid,pid_t,pid,int *,wait_stat,int,options) -static inline _syscall1(int,delete_module,const char *,name) - -static inline pid_twait (int * wait_stat) -{ -return waitpid (-1 ,wait_stat,0 ); -}#endif
include/asm-mips/unistd.h +0 -7
@@ -467,7 +467,6 @@* some others too. */ #define __NR__exit __NR_exit -static inline _syscall0(int,sync) 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)
@@ -478,12 +477,6 @@ static inline _syscall1(int,close,int,fd) static inline _syscall1(int,_exit,int,exitcode) static inline _syscall3(pid_t,waitpid,pid_t,pid,int *,wait_stat,int,options) -static inline _syscall1(int,delete_module,const char *,name) - -static inline pid_twait (int * wait_stat) -{ -return waitpid (-1 ,wait_stat,0 ); -}#endif /* !defined (__KERNEL_SYSCALLS__) */ #endif /* !defined (_LANGUAGE_ASSEMBLY) */
include/asm-mips64/unistd.h +0 -7
@@ -793,7 +793,6 @@* some others too. */ #define __NR__exit __NR_exit -static inline _syscall0(int,sync) 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)
@@ -804,12 +803,6 @@ static inline _syscall1(int,close,int,fd) static inline _syscall1(int,_exit,int,exitcode) static inline _syscall3(pid_t,waitpid,pid_t,pid,int *,wait_stat,int,options) -static inline _syscall1(int,delete_module,const char *,name) - -static inline pid_twait (int * wait_stat) -{ -return waitpid (-1 ,wait_stat,0 ); -}#endif /* !defined (__KERNEL_SYSCALLS__) */ #endif /* !defined (_LANGUAGE_ASSEMBLY) */
include/asm-parisc/unistd.h +0 -30
@@ -806,24 +806,6 @@#ifdef __KERNEL_SYSCALLS__ -static inline int idle (void ) -{ -extern int sys_idle (void ); -return sys_idle (); -} - -static inline int pause (void ) -{ -extern int sys_pause (void ); -return sys_pause (); -} - -static inline int sync (void ) -{ -extern int sys_sync (void ); -return sys_sync (); -} -static inline pid_t setsid (void ) {extern int sys_setsid (void );
@@ -877,18 +859,6 @@return sys_wait4 ((int )pid, wait_stat, options,NULL ); } -static inline int delete_module (const char *name) -{ -extern int sys_delete_module (const char *name); -return sys_delete_module (name); -} - -static inline pid_t wait (int * wait_stat) -{ -extern int sys_wait4 (int ,int *,int ,struct rusage *); -return sys_wait4 (-1 , wait_stat,0 ,NULL ); -} -static inline int execve (char *filename,char * argv [],char * envp[]) {
include/asm-ppc/unistd.h +0 -4
@@ -436,10 +436,6 @@extern int close (int fd);extern pid_t waitpid (pid_t pid,int *wait_stat,int options); -static inline pid_t wait (int * wait_stat) -{ -return waitpid (-1 , wait_stat,0 ); -}#endif /* __KERNEL_SYSCALLS__ */ /*
include/asm-ppc64/unistd.h +0 -8
@@ -431,8 +431,6 @@* System call prototypes. */ #define __NR__exit __NR_exit -static inline _syscall0(int,pause) -static inline _syscall0(int,sync) 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)
@@ -443,12 +441,6 @@ static inline _syscall1(int,close,int,fd) static inline _syscall1(int,_exit,int,exitcode) static inline _syscall3(pid_t,waitpid,pid_t,pid,int *,wait_stat,int,options) -static inline _syscall1(int,delete_module,const char *,name) - -static inline pid_twait (int * wait_stat) -{ -return waitpid (-1 ,wait_stat,0 ); -}#endif /* __KERNEL_SYSCALLS__ */
include/asm-s390/unistd.h +0 -9
@@ -368,9 +368,6 @@* some others too. */ #define __NR__exit __NR_exit -static inline _syscall0(int,idle) -static inline _syscall0(int,pause) -static inline _syscall0(int,sync) 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)
@@ -380,7 +377,6 @@ static inline _syscall3(int,open,const char *,file,int,flag,int,mode) static inline _syscall1(int,close,int,fd) static inline _syscall1(int,_exit,int,exitcode) -static inline _syscall1(int,delete_module,const char *,name) static inline _syscall2(long,stat,char *,filename,struct stat *,statbuf) struct rusage;
@@ -390,11 +386,6 @@ return sys_wait4(pid, wait_stat, flags, NULL); } -static inline pid_t wait (int * wait_stat) -{ -return waitpid (-1 ,wait_stat,0 ); -} -#endif /*
include/asm-s390x/unistd.h +0 -9
@@ -335,9 +335,6 @@* some others too. */ #define __NR__exit __NR_exit -static inline _syscall0(int,idle) -static inline _syscall0(int,pause) -static inline _syscall0(int,sync) 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)
@@ -347,7 +344,6 @@ static inline _syscall3(int,open,const char *,file,int,flag,int,mode) static inline _syscall1(int,close,int,fd) static inline _syscall1(int,_exit,int,exitcode) -static inline _syscall1(int,delete_module,const char *,name) static inline _syscall2(long,stat,char *,filename,struct stat *,statbuf) struct rusage;
@@ -357,11 +353,6 @@ return sys_wait4(pid, wait_stat, flags, NULL); } -static inline pid_t wait (int * wait_stat) -{ -return waitpid (-1 ,wait_stat,0 ); -} -#endif /*
include/asm-sh/unistd.h +0 -7
@@ -347,8 +347,6 @@* some others too. */ #define __NR__exit __NR_exit -static __inline__ _syscall0(int,pause) -static __inline__ _syscall0(int,sync) 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)
@@ -359,12 +357,7 @@ static __inline__ _syscall1(int,close,int,fd) static __inline__ _syscall1(int,_exit,int,exitcode) static __inline__ _syscall3(pid_t,waitpid,pid_t,pid,int *,wait_stat,int,options) -static __inline__ _syscall1(int,delete_module,const char *,name) -static __inline__ pid_twait (int * wait_stat) -{ -return waitpid (-1 ,wait_stat,0 ); -}#endif /*
include/asm-sparc/unistd.h +0 -8
@@ -416,8 +416,6 @@* some others too. */ #define __NR__exit __NR_exit -static __inline__ _syscall0(int,pause) -static __inline__ _syscall0(int,sync) 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)
@@ -428,12 +426,6 @@ static __inline__ _syscall1(int,close,int,fd) static __inline__ _syscall1(int,_exit,int,exitcode) static __inline__ _syscall3(pid_t,waitpid,pid_t,pid,int *,wait_stat,int,options) -static __inline__ _syscall1(int,delete_module,const char *,name) - -static __inline__ pid_twait (int * wait_stat) -{ -return waitpid (-1 ,wait_stat,0 ); -}#endif /* __KERNEL_SYSCALLS__ */
include/asm-sparc64/unistd.h +0 -8
@@ -406,8 +406,6 @@* some others too. */ #define __NR__exit __NR_exit -static __inline__ _syscall0(int,pause) -static __inline__ _syscall0(int,sync) 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)
@@ -418,12 +416,6 @@ static __inline__ _syscall1(int,close,int,fd) static __inline__ _syscall1(int,_exit,int,exitcode) static __inline__ _syscall3(pid_t,waitpid,pid_t,pid,int *,wait_stat,int,options) -static __inline__ _syscall1(int,delete_module,const char *,name) - -static __inline__ pid_twait (int * wait_stat) -{ -return waitpid (-1 ,wait_stat,0 ); -}#endif /* __KERNEL_SYSCALLS__ */
include/asm-um/unistd.h +0 -5
@@ -61,11 +61,6 @@ KERNEL_CALL(pid_t, sys_wait4, pid, status, options, NULL) } -static inline pid_t wait (int *status) -{ - KERNEL_CALL(pid_t, sys_wait4, -1, status, 0, NULL) -} -static inline pid_t setsid (void ) {KERNEL_CALL (pid_t, sys_setsid)
include/asm-x86_64/unistd.h +0 -23
@@ -573,18 +573,6 @@*/ #define __NR__exit __NR_exit -extern long sys_pause (void ); -static inline long pause (void ) -{ -return sys_pause (); -} - -extern long sys_sync (void ); -static inline long sync (void ) -{ -return sys_sync (); -} -extern pid_t sys_setsid (void );static inline pid_t setsid (void ) {
@@ -636,12 +624,6 @@sys_exit (error_code); } -extern long sys_delete_module (const char *); -static inline long delete_module (const char *name_user) -{ -return sys_delete_module (name_user); -} -struct rusage ;asmlinkage long sys_wait4 (pid_t pid,unsigned int * stat_addr,int options,struct rusage * ru);
@@ -650,11 +632,6 @@return sys_wait4 (pid, wait_stat, flags,NULL ); } -static inline pid_t wait (int * wait_stat) -{ -return waitpid (-1 ,wait_stat,0 ); -} -#endif /* __KERNEL_SYSCALLS__ */ #endif /* __NO_STUBS */
init/do_mounts.c +1 -1
@@ -710,7 +710,7 @@ pid =kernel_thread (do_linuxrc,"/linuxrc" ,SIGCHLD );if (pid >0 ) { -while (pid !=wait (&i)) +while (pid !=waitpid (-1 , &i,0 ))yield (); }