Chinaunix首页 | 论坛 | 博客
  • 博客访问: 407561
  • 博文数量: 101
  • 博客积分: 2207
  • 博客等级: 大尉
  • 技术积分: 2508
  • 用 户 组: 普通用户
  • 注册时间: 2011-04-19 20:45
文章分类

全部博文(101)

文章存档

2013年(15)

2012年(86)

我的朋友

分类: LINUX

2012-12-31 11:29:56

Linux下有哪些系统调用,在哪里可以查到
在/usr/include/asm/unistd.h
具体内容如代码所示

点击(此处)折叠或打开

  1. /* File autogenerated by 'make headers_install' */
  2. #ifndef __ASM_STUB_UNISTD_H
  3. #define __ASM_STUB_UNISTD_H
  4. # if defined __x86_64__
  5. # include <asm-x86_64/unistd.h>
  6. # elif defined __i386__
  7. # include <asm-i386/unistd.h>
  8. # else
  9. # warning This machine appears to be neither x86_64 nor i386.
  10. # endif
  11. #endif /* __ASM_STUB_UNISTD_H */
  12. ~
我的机器是x86_64 位系统,内容为

点击(此处)折叠或打开

  1. ifndef _ASM_X86_64_UNISTD_H_
  2. #define _ASM_X86_64_UNISTD_H_

  3. #ifndef __SYSCALL
  4. #define __SYSCALL(a,b)
  5. #endif

  6. /*
  7.  * This file contains the system call numbers.
  8.  *
  9.  * Note: holes are not allowed.
  10.  */

  11. /* at least 8 syscall per cacheline */
  12. #define __NR_read 0
  13. __SYSCALL(__NR_read, sys_read)
  14. #define __NR_write 1
  15. __SYSCALL(__NR_write, sys_write)
  16. #define __NR_open 2
  17. __SYSCALL(__NR_open, sys_open)
  18. #define __NR_close 3
  19. __SYSCALL(__NR_close, sys_close)
  20. #define __NR_stat 4
  21. __SYSCALL(__NR_stat, sys_newstat)
  22. #define __NR_fstat 5
  23. __SYSCALL(__NR_fstat, sys_newfstat)
  24. #define __NR_lstat 6
  25. __SYSCALL(__NR_lstat, sys_newlstat)
  26. #define __NR_poll 7
  27. __SYSCALL(__NR_poll, sys_poll)

  28. #define __NR_lseek 8
  29. __SYSCALL(__NR_lseek, sys_lseek)
  30. #define __NR_mmap 9
  31. __SYSCALL(__NR_mmap, sys_mmap)
  32. #define __NR_mprotect 10
  33. __SYSCALL(__NR_mprotect, sys_mprotect)
  34. #define __NR_munmap 11
  35. __SYSCALL(__NR_munmap, sys_munmap)
  36. #define __NR_brk 12
  37. __SYSCALL(__NR_brk, sys_brk)
  38. #define __NR_rt_sigaction 13
  39. __SYSCALL(__NR_rt_sigaction, sys_rt_sigaction)
  40. #define __NR_rt_sigprocmask 14
  41. __SYSCALL(__NR_rt_sigprocmask, sys_rt_sigprocmask)
  42. #define __NR_rt_sigreturn 15
  43. __SYSCALL(__NR_rt_sigreturn, stub_rt_sigreturn)


阅读(2115) | 评论(0) | 转发(1) |
给主人留下些什么吧!~~