--- linux-libc-headers/include/asm-x86_64/unistd.h.orig 2004-03-30 20:18:04.000000000 +0200 +++ linux-libc-headers/include/asm-x86_64/unistd.h 2004-04-25 17:29:44.420487688 +0200 @@ -551,8 +551,6 @@ return (type) (res); \ } while (0) -#ifndef __KERNEL_SYSCALLS__ - #define __syscall "syscall" #define _syscall0(type,name) \ @@ -634,103 +632,6 @@ __syscall_return(type,__res); \ } -#else /* __KERNEL_SYSCALLS__ */ - -#include -#include - -/* - * we need this inline - forking from kernel space will result - * in NO COPY ON WRITE (!!!), until an execve is executed. This - * is no problem, but for the stack. This is handled by not letting - * main() use the stack at all after fork(). Thus, no function - * calls - which means inline code for fork too, as otherwise we - * would use the stack upon exit from 'fork()'. - * - * Actually only pause and fork are needed inline, so that there - * won't be any messing with the stack from main(), but we define - * some others too. - */ -#define __NR__exit __NR_exit - -static inline pid_t setsid(void) -{ - return sys_setsid(); -} - -static inline ssize_t write(unsigned int fd, char * buf, size_t count) -{ - return sys_write(fd, buf, count); -} - -static inline ssize_t read(unsigned int fd, char * buf, size_t count) -{ - return sys_read(fd, buf, count); -} - -static inline off_t lseek(unsigned int fd, off_t offset, unsigned int origin) -{ - return sys_lseek(fd, offset, origin); -} - -static inline long dup(unsigned int fd) -{ - return sys_dup(fd); -} - -/* implemented in asm in arch/x86_64/kernel/entry.S */ -extern long execve(char *, char **, char **); - -static inline long open(const char * filename, int flags, int mode) -{ - return sys_open(filename, flags, mode); -} - -static inline long close(unsigned int fd) -{ - return sys_close(fd); -} - -static inline pid_t waitpid(int pid, int * wait_stat, int flags) -{ - return sys_wait4(pid, wait_stat, flags, NULL); -} - -extern long sys_mmap(unsigned long addr, unsigned long len, - unsigned long prot, unsigned long flags, - unsigned long fd, unsigned long off); - -extern int sys_modify_ldt(int func, void *ptr, unsigned long bytecount); - -asmlinkage long sys_execve(char *name, char **argv, char **envp, - struct pt_regs regs); -asmlinkage long sys_clone(unsigned long clone_flags, unsigned long newsp, - void *parent_tid, void *child_tid, - struct pt_regs regs); -asmlinkage long sys_fork(struct pt_regs regs); -asmlinkage long sys_vfork(struct pt_regs regs); -asmlinkage long sys_pipe(int *fildes); - -#endif /* __KERNEL_SYSCALLS__ */ - -#ifndef __ASSEMBLY__ - -#include -#include -#include - -asmlinkage long sys_ptrace(long request, long pid, - unsigned long addr, long data); -asmlinkage long sys_iopl(unsigned int level, struct pt_regs regs); -asmlinkage long sys_ioperm(unsigned long from, unsigned long num, int turn_on); -struct sigaction; -asmlinkage long sys_rt_sigaction(int sig, - const struct sigaction *act, - struct sigaction *oact, - size_t sigsetsize); - -#endif /* __ASSEMBLY__ */ - #endif /* __NO_STUBS */ /*