Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[PATCH] xtensa: remove old syscalls

xtensa is now in -rc1, with the obsolete syscalls still in there, so I
guess this about the last chance to correct the ABI. Applying the patch
obviously breaks all sorts of user space binaries and probably also
requires the appropriate changes to be made to libc.

On the other hand, if a decision is made to keep the broken interface, it
should at least be a conscious one instead of an oversight.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Cc: Chris Zankel <chris@zankel.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>

authored by

Arnd Bergmann and committed by
Linus Torvalds
87591451 605a69ac

+30 -277
+2 -150
arch/xtensa/kernel/syscalls.c
··· 46 46 47 47 extern void do_syscall_trace(void); 48 48 typedef int (*syscall_t)(void *a0,...); 49 - extern int (*do_syscalls)(struct pt_regs *regs, syscall_t fun, 50 - int narg); 51 49 extern syscall_t sys_call_table[]; 52 50 extern unsigned char sys_narg_table[]; 53 51 ··· 70 72 /* 71 73 * Common code for old and new mmaps. 72 74 */ 73 - 74 - static inline long do_mmap2(unsigned long addr, unsigned long len, 75 - unsigned long prot, unsigned long flags, 76 - unsigned long fd, unsigned long pgoff) 75 + long sys_mmap2(unsigned long addr, unsigned long len, unsigned long prot, 76 + unsigned long flags, unsigned long fd, unsigned long pgoff) 77 77 { 78 78 int error = -EBADF; 79 79 struct file * file = NULL; ··· 91 95 fput(file); 92 96 out: 93 97 return error; 94 - } 95 - 96 - unsigned long old_mmap(unsigned long addr, size_t len, int prot, 97 - int flags, int fd, off_t offset) 98 - { 99 - return do_mmap2(addr, len, prot, flags, fd, offset >> PAGE_SHIFT); 100 - } 101 - 102 - long sys_mmap2(unsigned long addr, unsigned long len, unsigned long prot, 103 - unsigned long flags, unsigned long fd, unsigned long pgoff) 104 - { 105 - return do_mmap2(addr, len, prot, flags, fd, pgoff); 106 - } 107 - 108 - int sys_fork(struct pt_regs *regs) 109 - { 110 - return do_fork(SIGCHLD, regs->areg[1], regs, 0, NULL, NULL); 111 - } 112 - 113 - int sys_vfork(struct pt_regs *regs) 114 - { 115 - return do_fork(CLONE_VFORK|CLONE_VM|SIGCHLD, regs->areg[1], 116 - regs, 0, NULL, NULL); 117 98 } 118 99 119 100 int sys_clone(struct pt_regs *regs) ··· 134 161 return 0; 135 162 return -EFAULT; 136 163 } 137 - 138 - int sys_olduname(struct oldold_utsname * name) 139 - { 140 - int error; 141 - 142 - if (!name) 143 - return -EFAULT; 144 - if (!access_ok(VERIFY_WRITE,name,sizeof(struct oldold_utsname))) 145 - return -EFAULT; 146 - 147 - error = __copy_to_user(&name->sysname,&system_utsname.sysname,__OLD_UTS_LEN); 148 - error -= __put_user(0,name->sysname+__OLD_UTS_LEN); 149 - error -= __copy_to_user(&name->nodename,&system_utsname.nodename,__OLD_UTS_LEN); 150 - error -= __put_user(0,name->nodename+__OLD_UTS_LEN); 151 - error -= __copy_to_user(&name->release,&system_utsname.release,__OLD_UTS_LEN); 152 - error -= __put_user(0,name->release+__OLD_UTS_LEN); 153 - error -= __copy_to_user(&name->version,&system_utsname.version,__OLD_UTS_LEN); 154 - error -= __put_user(0,name->version+__OLD_UTS_LEN); 155 - error -= __copy_to_user(&name->machine,&system_utsname.machine,__OLD_UTS_LEN); 156 - error -= __put_user(0,name->machine+__OLD_UTS_LEN); 157 - 158 - return error ? -EFAULT : 0; 159 - } 160 - 161 164 162 165 /* 163 166 * Build the string table for the builtin "poor man's strace". ··· 268 319 regs->areg[2] = res; 269 320 do_syscall_trace(); 270 321 } 271 - 272 - /* 273 - * sys_ipc() is the de-multiplexer for the SysV IPC calls.. 274 - * 275 - * This is really horribly ugly. 276 - */ 277 - 278 - int sys_ipc (uint call, int first, int second, 279 - int third, void __user *ptr, long fifth) 280 - { 281 - int version, ret; 282 - 283 - version = call >> 16; /* hack for backward compatibility */ 284 - call &= 0xffff; 285 - ret = -ENOSYS; 286 - 287 - switch (call) { 288 - case SEMOP: 289 - ret = sys_semtimedop (first, (struct sembuf __user *)ptr, 290 - second, NULL); 291 - break; 292 - 293 - case SEMTIMEDOP: 294 - ret = sys_semtimedop (first, (struct sembuf __user *)ptr, 295 - second, (const struct timespec *) fifth); 296 - break; 297 - 298 - case SEMGET: 299 - ret = sys_semget (first, second, third); 300 - break; 301 - 302 - case SEMCTL: { 303 - union semun fourth; 304 - 305 - if (ptr && !get_user(fourth.__pad, (void *__user *) ptr)) 306 - ret = sys_semctl (first, second, third, fourth); 307 - break; 308 - } 309 - 310 - case MSGSND: 311 - ret = sys_msgsnd (first, (struct msgbuf __user*) ptr, 312 - second, third); 313 - break; 314 - 315 - case MSGRCV: 316 - switch (version) { 317 - case 0: { 318 - struct ipc_kludge tmp; 319 - 320 - if (ptr && !copy_from_user(&tmp, 321 - (struct ipc_kludge *) ptr, 322 - sizeof (tmp))) 323 - ret = sys_msgrcv (first, tmp.msgp, second, 324 - tmp.msgtyp, third); 325 - break; 326 - } 327 - 328 - default: 329 - ret = sys_msgrcv (first, (struct msgbuf __user *) ptr, 330 - second, 0, third); 331 - break; 332 - } 333 - break; 334 - 335 - case MSGGET: 336 - ret = sys_msgget ((key_t) first, second); 337 - break; 338 - 339 - case MSGCTL: 340 - ret = sys_msgctl (first, second, (struct msqid_ds __user*) ptr); 341 - break; 342 - 343 - case SHMAT: { 344 - ulong raddr; 345 - ret = do_shmat (first, (char __user *) ptr, second, &raddr); 346 - 347 - if (!ret) 348 - ret = put_user (raddr, (ulong __user *) third); 349 - 350 - break; 351 - } 352 - 353 - case SHMDT: 354 - ret = sys_shmdt ((char __user *)ptr); 355 - break; 356 - 357 - case SHMGET: 358 - ret = sys_shmget (first, second, third); 359 - break; 360 - 361 - case SHMCTL: 362 - ret = sys_shmctl (first, second, (struct shmid_ds __user*) ptr); 363 - break; 364 - } 365 - return ret; 366 - } 367 -
+28 -29
arch/xtensa/kernel/syscalls.h
··· 25 25 */ 26 26 27 27 SYSCALL(0, 0) /* 00 */ 28 - 29 28 SYSCALL(sys_exit, 1) 30 - SYSCALL(sys_fork, 0) 29 + SYSCALL(sys_ni_syscall, 0) 31 30 SYSCALL(sys_read, 3) 32 31 SYSCALL(sys_write, 3) 33 32 SYSCALL(sys_open, 3) /* 05 */ 34 33 SYSCALL(sys_close, 1) 35 - SYSCALL(sys_waitpid, 3) 34 + SYSCALL(sys_ni_syscall, 3) 36 35 SYSCALL(sys_creat, 2) 37 36 SYSCALL(sys_link, 2) 38 37 SYSCALL(sys_unlink, 1) /* 10 */ 39 38 SYSCALL(sys_execve, 0) 40 39 SYSCALL(sys_chdir, 1) 41 - SYSCALL(sys_time, 1) 40 + SYSCALL(sys_ni_syscall, 1) 42 41 SYSCALL(sys_mknod, 3) 43 42 SYSCALL(sys_chmod, 2) /* 15 */ 44 43 SYSCALL(sys_lchown, 3) ··· 46 47 SYSCALL(sys_lseek, 3) 47 48 SYSCALL(sys_getpid, 0) /* 20 */ 48 49 SYSCALL(sys_mount, 5) 49 - SYSCALL(sys_oldumount, 1) 50 + SYSCALL(sys_ni_syscall, 1) 50 51 SYSCALL(sys_setuid, 1) 51 52 SYSCALL(sys_getuid, 0) 52 - SYSCALL(sys_stime, 1) /* 25 */ 53 + SYSCALL(sys_ni_syscall, 1) /* 25 */ 53 54 SYSCALL(sys_ptrace, 4) 54 - SYSCALL(sys_alarm, 1) 55 + SYSCALL(sys_ni_syscall, 1) 55 56 SYSCALL(sys_fstat, 2) 56 - SYSCALL(sys_pause, 0) 57 + SYSCALL(sys_ni_syscall, 0) 57 58 SYSCALL(sys_utime, 2) /* 30 */ 58 59 SYSCALL(sys_ni_syscall, 0) 59 60 SYSCALL(sys_ni_syscall, 0) 60 61 SYSCALL(sys_access, 2) 61 - SYSCALL(sys_nice, 1) 62 + SYSCALL(sys_ni_syscall, 1) 62 63 SYSCALL(sys_ni_syscall, 0) /* 35 */ 63 64 SYSCALL(sys_sync, 0) 64 65 SYSCALL(sys_kill, 2) ··· 72 73 SYSCALL(sys_brk, 1) /* 45 */ 73 74 SYSCALL(sys_setgid, 1) 74 75 SYSCALL(sys_getgid, 0) 75 - SYSCALL(sys_ni_syscall, 0) /* was signal(2) */ 76 + SYSCALL(sys_ni_syscall, 0) 76 77 SYSCALL(sys_geteuid, 0) 77 78 SYSCALL(sys_getegid, 0) /* 50 */ 78 79 SYSCALL(sys_acct, 1) ··· 83 84 SYSCALL(sys_ni_syscall, 2) 84 85 SYSCALL(sys_setpgid, 2) 85 86 SYSCALL(sys_ni_syscall, 0) 86 - SYSCALL(sys_olduname, 1) 87 + SYSCALL(sys_ni_syscall, 0) 87 88 SYSCALL(sys_umask, 1) /* 60 */ 88 89 SYSCALL(sys_chroot, 1) 89 90 SYSCALL(sys_ustat, 2) 90 91 SYSCALL(sys_dup2, 2) 91 92 SYSCALL(sys_getppid, 0) 92 - SYSCALL(sys_getpgrp, 0) /* 65 */ 93 + SYSCALL(sys_ni_syscall, 0) /* 65 */ 93 94 SYSCALL(sys_setsid, 0) 94 95 SYSCALL(sys_sigaction, 3) 95 - SYSCALL(sys_sgetmask, 0) 96 - SYSCALL(sys_ssetmask, 1) 96 + SYSCALL(sys_ni_syscall, 0) 97 + SYSCALL(sys_ni_syscall, 1) 97 98 SYSCALL(sys_setreuid, 2) /* 70 */ 98 99 SYSCALL(sys_setregid, 2) 99 100 SYSCALL(sys_sigsuspend, 0) 100 - SYSCALL(sys_sigpending, 1) 101 + SYSCALL(sys_ni_syscall, 1) 101 102 SYSCALL(sys_sethostname, 2) 102 103 SYSCALL(sys_setrlimit, 2) /* 75 */ 103 104 SYSCALL(sys_getrlimit, 2) ··· 106 107 SYSCALL(sys_settimeofday, 2) 107 108 SYSCALL(sys_getgroups, 2) /* 80 */ 108 109 SYSCALL(sys_setgroups, 2) 109 - SYSCALL(sys_ni_syscall, 0) /* old_select */ 110 + SYSCALL(sys_ni_syscall, 0) 110 111 SYSCALL(sys_symlink, 2) 111 112 SYSCALL(sys_lstat, 2) 112 113 SYSCALL(sys_readlink, 3) /* 85 */ 113 114 SYSCALL(sys_uselib, 1) 114 115 SYSCALL(sys_swapon, 2) 115 116 SYSCALL(sys_reboot, 3) 116 - SYSCALL(old_readdir, 3) 117 - SYSCALL(old_mmap, 6) /* 90 */ 117 + SYSCALL(sys_ni_syscall, 3) 118 + SYSCALL(sys_ni_syscall, 6) /* 90 */ 118 119 SYSCALL(sys_munmap, 2) 119 120 SYSCALL(sys_truncate, 2) 120 121 SYSCALL(sys_ftruncate, 2) ··· 126 127 SYSCALL(sys_statfs, 2) 127 128 SYSCALL(sys_fstatfs, 2) /* 100 */ 128 129 SYSCALL(sys_ni_syscall, 3) 129 - SYSCALL(sys_socketcall, 2) 130 + SYSCALL(sys_ni_syscall, 2) 130 131 SYSCALL(sys_syslog, 3) 131 132 SYSCALL(sys_setitimer, 3) 132 133 SYSCALL(sys_getitimer, 2) /* 105 */ ··· 136 137 SYSCALL(sys_uname, 1) 137 138 SYSCALL(sys_ni_syscall, 0) /* 110 */ 138 139 SYSCALL(sys_vhangup, 0) 139 - SYSCALL(sys_ni_syscall, 0) /* was sys_idle() */ 140 + SYSCALL(sys_ni_syscall, 0) 140 141 SYSCALL(sys_ni_syscall, 0) 141 142 SYSCALL(sys_wait4, 4) 142 143 SYSCALL(sys_swapoff, 1) /* 115 */ 143 144 SYSCALL(sys_sysinfo, 1) 144 - SYSCALL(sys_ipc, 5) /* 6 really, but glibc uses only 5) */ 145 + SYSCALL(sys_ni_syscall, 0) 145 146 SYSCALL(sys_fsync, 1) 146 147 SYSCALL(sys_sigreturn, 0) 147 148 SYSCALL(sys_clone, 0) /* 120 */ 148 149 SYSCALL(sys_setdomainname, 2) 149 150 SYSCALL(sys_newuname, 1) 150 - SYSCALL(sys_ni_syscall, 0) /* sys_modify_ldt */ 151 + SYSCALL(sys_ni_syscall, 0) 151 152 SYSCALL(sys_adjtimex, 1) 152 153 SYSCALL(sys_mprotect, 3) /* 125 */ 153 - SYSCALL(sys_sigprocmask, 3) 154 - SYSCALL(sys_ni_syscall, 2) /* old sys_create_module */ 154 + SYSCALL(sys_ni_syscall, 3) 155 + SYSCALL(sys_ni_syscall, 2) 155 156 SYSCALL(sys_init_module, 2) 156 157 SYSCALL(sys_delete_module, 1) 157 - SYSCALL(sys_ni_syscall, 1) /* old sys_get_kernel_sysm */ /* 130 */ 158 + SYSCALL(sys_ni_syscall, 1) /* 130 */ 158 159 SYSCALL(sys_quotactl, 0) 159 160 SYSCALL(sys_getpgid, 1) 160 161 SYSCALL(sys_fchdir, 1) 161 162 SYSCALL(sys_bdflush, 2) 162 163 SYSCALL(sys_sysfs, 3) /* 135 */ 163 164 SYSCALL(sys_personality, 1) 164 - SYSCALL(sys_ni_syscall, 0) /* for afs_syscall */ 165 + SYSCALL(sys_ni_syscall, 0) 165 166 SYSCALL(sys_setfsuid, 1) 166 167 SYSCALL(sys_setfsgid, 1) 167 168 SYSCALL(sys_llseek, 5) /* 140 */ ··· 211 212 SYSCALL(sys_socketpair, 4) 212 213 SYSCALL(sys_setresuid, 3) /* 185 */ 213 214 SYSCALL(sys_getresuid, 3) 214 - SYSCALL(sys_ni_syscall, 5) /* old sys_query_module */ 215 + SYSCALL(sys_ni_syscall, 5) 215 216 SYSCALL(sys_poll, 3) 216 217 SYSCALL(sys_nfsservctl, 3) 217 218 SYSCALL(sys_setresgid, 3) /* 190 */ ··· 234 235 SYSCALL(sys_sendfile, 4) 235 236 SYSCALL(sys_ni_syscall, 0) 236 237 SYSCALL(sys_ni_syscall, 0) 237 - SYSCALL(sys_mmap2, 6) /* 210 */ 238 + SYSCALL(sys_mmap, 6) /* 210 */ 238 239 SYSCALL(sys_truncate64, 2) 239 240 SYSCALL(sys_ftruncate64, 2) 240 241 SYSCALL(sys_stat64, 2) ··· 244 245 SYSCALL(sys_mincore, 3) 245 246 SYSCALL(sys_madvise, 3) 246 247 SYSCALL(sys_getdents64, 3) 247 - SYSCALL(sys_vfork, 0) /* 220 */ 248 + SYSCALL(sys_ni_syscall, 0) /* 220 */
-98
include/asm-xtensa/unistd.h
··· 13 13 14 14 #include <linux/linkage.h> 15 15 16 - //#define __NR_setup 0 /* used only by init, to get system going */ 17 16 #define __NR_spill 0 18 17 #define __NR_exit 1 19 - #define __NR_fork 2 20 18 #define __NR_read 3 21 19 #define __NR_write 4 22 20 #define __NR_open 5 23 21 #define __NR_close 6 24 - #define __NR_waitpid 7 25 22 #define __NR_creat 8 26 23 #define __NR_link 9 27 24 #define __NR_unlink 10 28 25 #define __NR_execve 11 29 26 #define __NR_chdir 12 30 - #define __NR_time 13 31 27 #define __NR_mknod 14 32 28 #define __NR_chmod 15 33 29 #define __NR_lchown 16 34 30 #define __NR_break 17 35 - #define __NR_oldstat 18 36 31 #define __NR_lseek 19 37 32 #define __NR_getpid 20 38 33 #define __NR_mount 21 39 - #define __NR_oldumount 22 40 34 #define __NR_setuid 23 41 35 #define __NR_getuid 24 42 - #define __NR_stime 25 43 36 #define __NR_ptrace 26 44 - #define __NR_alarm 27 45 - #define __NR_oldfstat 28 46 - #define __NR_pause 29 47 37 #define __NR_utime 30 48 38 #define __NR_stty 31 49 39 #define __NR_gtty 32 50 40 #define __NR_access 33 51 - #define __NR_nice 34 52 41 #define __NR_ftime 35 53 42 #define __NR_sync 36 54 43 #define __NR_kill 37 ··· 55 66 #define __NR_geteuid 49 56 67 #define __NR_getegid 50 57 68 #define __NR_acct 51 58 - #define __NR_umount 52 59 69 #define __NR_lock 53 60 70 #define __NR_ioctl 54 61 71 #define __NR_fcntl 55 62 - #define __NR_mpx 56 63 72 #define __NR_setpgid 57 64 73 #define __NR_ulimit 58 65 - #define __NR_oldolduname 59 66 74 #define __NR_umask 60 67 75 #define __NR_chroot 61 68 76 #define __NR_ustat 62 69 77 #define __NR_dup2 63 70 78 #define __NR_getppid 64 71 - #define __NR_getpgrp 65 72 79 #define __NR_setsid 66 73 80 #define __NR_sigaction 67 74 - #define __NR_sgetmask 68 75 - #define __NR_ssetmask 69 76 81 #define __NR_setreuid 70 77 82 #define __NR_setregid 71 78 83 #define __NR_sigsuspend 72 ··· 81 98 #define __NR_setgroups 81 82 99 #define __NR_select 82 83 100 #define __NR_symlink 83 84 - #define __NR_oldlstat 84 85 101 #define __NR_readlink 85 86 102 #define __NR_uselib 86 87 103 #define __NR_swapon 87 88 104 #define __NR_reboot 88 89 - #define __NR_readdir 89 90 - #define __NR_mmap 90 91 105 #define __NR_munmap 91 92 106 #define __NR_truncate 92 93 107 #define __NR_ftruncate 93 ··· 96 116 #define __NR_statfs 99 97 117 #define __NR_fstatfs 100 98 118 #define __NR_ioperm 101 99 - #define __NR_socketcall 102 100 119 #define __NR_syslog 103 101 120 #define __NR_setitimer 104 102 121 #define __NR_getitimer 105 103 122 #define __NR_stat 106 104 123 #define __NR_lstat 107 105 124 #define __NR_fstat 108 106 - #define __NR_olduname 109 107 125 #define __NR_iopl 110 108 126 #define __NR_vhangup 111 109 127 #define __NR_idle 112 110 - #define __NR_vm86 113 111 128 #define __NR_wait4 114 112 129 #define __NR_swapoff 115 113 130 #define __NR_sysinfo 116 114 - #define __NR_ipc 117 115 131 #define __NR_fsync 118 116 132 #define __NR_sigreturn 119 117 133 #define __NR_clone 120 ··· 116 140 #define __NR_modify_ldt 123 117 141 #define __NR_adjtimex 124 118 142 #define __NR_mprotect 125 119 - #define __NR_sigprocmask 126 120 143 #define __NR_create_module 127 121 144 #define __NR_init_module 128 122 145 #define __NR_delete_module 129 123 - #define __NR_get_kernel_syms 130 124 146 #define __NR_quotactl 131 125 147 #define __NR_getpgid 132 126 148 #define __NR_fchdir 133 127 149 #define __NR_bdflush 134 128 150 #define __NR_sysfs 135 129 151 #define __NR_personality 136 130 - #define __NR_afs_syscall 137 /* Syscall for Andrew File System */ 131 152 #define __NR_setfsuid 138 132 153 #define __NR_setfsgid 139 133 154 #define __NR__llseek 140 ··· 195 222 #define __NR_capset 205 196 223 #define __NR_sigaltstack 206 197 224 #define __NR_sendfile 207 198 - #define __NR_streams1 208 /* some people actually want it */ 199 - #define __NR_streams2 209 /* some people actually want it */ 200 225 #define __NR_mmap2 210 201 226 #define __NR_truncate64 211 202 227 #define __NR_ftruncate64 212 ··· 205 234 #define __NR_mincore 217 206 235 #define __NR_madvise 218 207 236 #define __NR_getdents64 219 208 - #define __NR_vfork 220 209 237 210 238 /* Keep this last; should always equal the last valid call number. */ 211 239 #define __NR_Linux_syscalls 220 ··· 418 448 419 449 420 450 #ifdef __KERNEL_SYSCALLS__ 421 - 422 - #include <linux/compiler.h> 423 - #include <linux/types.h> 424 - #include <linux/syscalls.h> 425 - 426 - /* 427 - * we need this inline - forking from kernel space will result 428 - * in NO COPY ON WRITE (!!!), until an execve is executed. This 429 - * is no problem, but for the stack. This is handled by not letting 430 - * main() use the stack at all after fork(). Thus, no function 431 - * calls - which means inline code for fork too, as otherwise we 432 - * would use the stack upon exit from 'fork()'. 433 - * 434 - * Actually only pause and fork are needed inline, so that there 435 - * won't be any messing with the stack from main(), but we define 436 - * some others too. 437 - */ 438 - 439 - #define __NR__exit __NR_exit 440 - 441 - static __inline__ _syscall0(int,pause) 442 - //static __inline__ _syscall1(int,setup,int,magic) FIXME 443 - static __inline__ _syscall0(int,sync) 444 - static __inline__ _syscall0(pid_t,setsid) 445 - static __inline__ _syscall3(int,write,int,fd,const char *,buf,off_t,count) 446 - static __inline__ _syscall3(int,read,int,fd,char *,buf,off_t,count) 447 - static __inline__ _syscall3(off_t,lseek,int,fd,off_t,offset,int,count) 448 - static __inline__ _syscall1(int,dup,int,fd) 449 451 static __inline__ _syscall3(int,execve,const char*,file,char**,argv,char**,envp) 450 - static __inline__ _syscall3(int,open,const char *,file,int,flag,int,mode) 451 - static __inline__ _syscall1(int,close,int,fd) 452 - static __inline__ _syscall1(int,_exit,int,exitcode) 453 - static __inline__ _syscall3(pid_t,waitpid,pid_t,pid,int *,wait_stat,int,options) 454 - static __inline__ _syscall1(int,delete_module,const char *,name) 455 - 456 - struct stat; 457 - static __inline__ _syscall2(int,fstat,int,fd,struct stat *,buf) 458 - static __inline__ _syscall0(pid_t,getpid) 459 - static __inline__ _syscall2(int,kill,int,pid,int,sig) 460 - static __inline__ _syscall2(int,stat,const char *, path,struct stat *,buf) 461 - static __inline__ _syscall1(int,unlink,char *,pathname) 462 - 463 - 464 - 465 - extern pid_t waitpid(int, int*, int ); 466 - static __inline__ pid_t wait(int * wait_stat) 467 - { 468 - return waitpid(-1,wait_stat,0); 469 - } 470 452 #endif 471 453 472 454 /* ··· 430 508 #define cond_syscall(x) asm(".weak\t" #x "\n\t.set\t" #x ",sys_ni_syscall"); 431 509 432 510 #ifdef __KERNEL__ 433 - #define __ARCH_WANT_IPC_PARSE_VERSION 434 - #define __ARCH_WANT_OLD_READDIR 435 - #define __ARCH_WANT_OLD_STAT 436 511 #define __ARCH_WANT_STAT64 437 - #define __ARCH_WANT_SYS_ALARM 438 - #define __ARCH_WANT_SYS_GETHOSTNAME 439 - #define __ARCH_WANT_SYS_PAUSE 440 - #define __ARCH_WANT_SYS_SGETMASK 441 - #define __ARCH_WANT_SYS_SIGNAL 442 - #define __ARCH_WANT_SYS_TIME 443 512 #define __ARCH_WANT_SYS_UTIME 444 - #define __ARCH_WANT_SYS_WAITPID 445 - #define __ARCH_WANT_SYS_SOCKETCALL 446 - #define __ARCH_WANT_SYS_FADVISE64 447 - #define __ARCH_WANT_SYS_GETPGRP 448 513 #define __ARCH_WANT_SYS_LLSEEK 449 - #define __ARCH_WANT_SYS_NICE 450 - #define __ARCH_WANT_SYS_OLD_GETRLIMIT 451 - #define __ARCH_WANT_SYS_OLDUMOUNT 452 - #define __ARCH_WANT_SYS_SIGPENDING 453 - #define __ARCH_WANT_SYS_SIGPROCMASK 454 514 #define __ARCH_WANT_SYS_RT_SIGACTION 455 515 #endif 456 - 457 - 458 516 459 517 #endif /* _XTENSA_UNISTD_H */