diff options
Diffstat (limited to 'include/asm-m68k/unistd.h')
-rw-r--r-- | include/asm-m68k/unistd.h | 46 |
1 files changed, 4 insertions, 42 deletions
diff --git a/include/asm-m68k/unistd.h b/include/asm-m68k/unistd.h index c2554bcd1747..7c0b6296b45c 100644 --- a/include/asm-m68k/unistd.h +++ b/include/asm-m68k/unistd.h | |||
@@ -285,6 +285,8 @@ | |||
285 | #define __NR_request_key 280 | 285 | #define __NR_request_key 280 |
286 | #define __NR_keyctl 281 | 286 | #define __NR_keyctl 281 |
287 | 287 | ||
288 | #ifdef __KERNEL__ | ||
289 | |||
288 | #define NR_syscalls 282 | 290 | #define NR_syscalls 282 |
289 | 291 | ||
290 | /* user-visible error numbers are in the range -1 - -124: see | 292 | /* user-visible error numbers are in the range -1 - -124: see |
@@ -383,7 +385,6 @@ __asm__ __volatile__ ("trap #0" \ | |||
383 | __syscall_return(type,__res); \ | 385 | __syscall_return(type,__res); \ |
384 | } | 386 | } |
385 | 387 | ||
386 | #ifdef __KERNEL__ | ||
387 | #define __ARCH_WANT_IPC_PARSE_VERSION | 388 | #define __ARCH_WANT_IPC_PARSE_VERSION |
388 | #define __ARCH_WANT_OLD_READDIR | 389 | #define __ARCH_WANT_OLD_READDIR |
389 | #define __ARCH_WANT_OLD_STAT | 390 | #define __ARCH_WANT_OLD_STAT |
@@ -406,52 +407,12 @@ __syscall_return(type,__res); \ | |||
406 | #define __ARCH_WANT_SYS_SIGPENDING | 407 | #define __ARCH_WANT_SYS_SIGPENDING |
407 | #define __ARCH_WANT_SYS_SIGPROCMASK | 408 | #define __ARCH_WANT_SYS_SIGPROCMASK |
408 | #define __ARCH_WANT_SYS_RT_SIGACTION | 409 | #define __ARCH_WANT_SYS_RT_SIGACTION |
409 | #endif | ||
410 | 410 | ||
411 | #ifdef __KERNEL_SYSCALLS__ | 411 | #ifdef __KERNEL_SYSCALLS__ |
412 | 412 | ||
413 | #include <linux/compiler.h> | ||
414 | #include <linux/interrupt.h> | ||
415 | #include <linux/types.h> | ||
416 | |||
417 | /* | ||
418 | * we need this inline - forking from kernel space will result | ||
419 | * in NO COPY ON WRITE (!!!), until an execve is executed. This | ||
420 | * is no problem, but for the stack. This is handled by not letting | ||
421 | * main() use the stack at all after fork(). Thus, no function | ||
422 | * calls - which means inline code for fork too, as otherwise we | ||
423 | * would use the stack upon exit from 'fork()'. | ||
424 | * | ||
425 | * Actually only pause and fork are needed inline, so that there | ||
426 | * won't be any messing with the stack from main(), but we define | ||
427 | * some others too. | ||
428 | */ | ||
429 | #define __NR__exit __NR_exit | ||
430 | static inline _syscall0(pid_t,setsid) | ||
431 | static inline _syscall3(int,write,int,fd,const char *,buf,off_t,count) | ||
432 | static inline _syscall3(int,read,int,fd,char *,buf,off_t,count) | ||
433 | static inline _syscall3(off_t,lseek,int,fd,off_t,offset,int,count) | ||
434 | static inline _syscall1(int,dup,int,fd) | ||
435 | static inline _syscall3(int,execve,const char *,file,char **,argv,char **,envp) | 413 | static inline _syscall3(int,execve,const char *,file,char **,argv,char **,envp) |
436 | static inline _syscall3(int,open,const char *,file,int,flag,int,mode) | ||
437 | static inline _syscall1(int,close,int,fd) | ||
438 | static inline _syscall1(int,_exit,int,exitcode) | ||
439 | static inline _syscall3(pid_t,waitpid,pid_t,pid,int *,wait_stat,int,options) | ||
440 | |||
441 | asmlinkage long sys_mmap2( | ||
442 | unsigned long addr, unsigned long len, | ||
443 | unsigned long prot, unsigned long flags, | ||
444 | unsigned long fd, unsigned long pgoff); | ||
445 | asmlinkage int sys_execve(char *name, char **argv, char **envp); | ||
446 | asmlinkage int sys_pipe(unsigned long *fildes); | ||
447 | struct pt_regs; | ||
448 | struct sigaction; | ||
449 | asmlinkage long sys_rt_sigaction(int sig, | ||
450 | const struct sigaction __user *act, | ||
451 | struct sigaction __user *oact, | ||
452 | size_t sigsetsize); | ||
453 | 414 | ||
454 | #endif | 415 | #endif /* __KERNEL_SYSCALLS__ */ |
455 | 416 | ||
456 | /* | 417 | /* |
457 | * "Conditional" syscalls | 418 | * "Conditional" syscalls |
@@ -461,4 +422,5 @@ asmlinkage long sys_rt_sigaction(int sig, | |||
461 | */ | 422 | */ |
462 | #define cond_syscall(x) asm(".weak\t" #x "\n\t.set\t" #x ",sys_ni_syscall") | 423 | #define cond_syscall(x) asm(".weak\t" #x "\n\t.set\t" #x ",sys_ni_syscall") |
463 | 424 | ||
425 | #endif /* __KERNEL__ */ | ||
464 | #endif /* _ASM_M68K_UNISTD_H_ */ | 426 | #endif /* _ASM_M68K_UNISTD_H_ */ |