syscalls.h 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. /*
  2. * syscalls.h - Linux syscall interfaces (arch-specific)
  3. *
  4. * Copyright (c) 2008 Jaswinder Singh Rajput
  5. * Copyright 2010 Tilera Corporation. All Rights Reserved.
  6. *
  7. * This program is free software; you can redistribute it and/or
  8. * modify it under the terms of the GNU General Public License
  9. * as published by the Free Software Foundation, version 2.
  10. *
  11. * This program is distributed in the hope that it will be useful, but
  12. * WITHOUT ANY WARRANTY; without even the implied warranty of
  13. * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, GOOD TITLE or
  14. * NON INFRINGEMENT. See the GNU General Public License for
  15. * more details.
  16. */
  17. #ifndef _ASM_TILE_SYSCALLS_H
  18. #define _ASM_TILE_SYSCALLS_H
  19. #include <linux/compiler.h>
  20. #include <linux/linkage.h>
  21. #include <linux/signal.h>
  22. #include <linux/types.h>
  23. #include <linux/compat.h>
  24. /* The array of function pointers for syscalls. */
  25. extern void *sys_call_table[];
  26. #ifdef CONFIG_COMPAT
  27. extern void *compat_sys_call_table[];
  28. #endif
  29. /*
  30. * Note that by convention, any syscall which requires the current
  31. * register set takes an additional "struct pt_regs *" pointer; a
  32. * _sys_xxx() trampoline in intvec*.S just sets up the pointer and
  33. * jumps to sys_xxx().
  34. */
  35. /* kernel/sys.c */
  36. ssize_t sys32_readahead(int fd, u32 offset_lo, u32 offset_hi, u32 count);
  37. long sys32_fadvise64(int fd, u32 offset_lo, u32 offset_hi,
  38. u32 len, int advice);
  39. int sys32_fadvise64_64(int fd, u32 offset_lo, u32 offset_hi,
  40. u32 len_lo, u32 len_hi, int advice);
  41. long sys_flush_cache(void);
  42. #ifndef __tilegx__ /* No mmap() in the 32-bit kernel. */
  43. #define sys_mmap sys_mmap
  44. #endif
  45. #ifndef __tilegx__
  46. /* mm/fault.c */
  47. long sys_cmpxchg_badaddr(unsigned long address, struct pt_regs *);
  48. long _sys_cmpxchg_badaddr(unsigned long address);
  49. #endif
  50. #ifdef CONFIG_COMPAT
  51. /* These four are not defined for 64-bit, but serve as "compat" syscalls. */
  52. long sys_fcntl64(unsigned int fd, unsigned int cmd, unsigned long arg);
  53. long sys_fstat64(unsigned long fd, struct stat64 __user *statbuf);
  54. long sys_truncate64(const char __user *path, loff_t length);
  55. long sys_ftruncate64(unsigned int fd, loff_t length);
  56. #endif
  57. /* These are the intvec*.S trampolines. */
  58. long _sys_sigaltstack(const stack_t __user *, stack_t __user *);
  59. long _sys_rt_sigreturn(void);
  60. long _sys_clone(unsigned long clone_flags, unsigned long newsp,
  61. void __user *parent_tid, void __user *child_tid);
  62. long _sys_execve(const char __user *filename,
  63. const char __user *const __user *argv,
  64. const char __user *const __user *envp);
  65. #include <asm-generic/syscalls.h>
  66. #endif /* _ASM_TILE_SYSCALLS_H */