syscall-template-i386-netbsd-1.3.S
上传用户:tsgydb
上传日期:2007-04-14
资源大小:10674k
文件大小:1k
源码类别:

MySQL数据库

开发平台:

Visual C++

  1. #include <machine/asm.h>
  2. #include <sys/syscall.h>
  3. #ifdef SYS___sigsuspend14
  4. #define SYS_sigsuspend SYS___sigsuspend14
  5. #endif
  6. #ifdef SYS___sigprocmask14
  7. #define SYS_sigprocmask SYS___sigprocmask14
  8. #endif
  9. #ifdef __STDC__
  10. #define SYSCALL(x)
  11. .globl _C_LABEL(machdep_sys_##x);
  12. _C_LABEL(machdep_sys_##x):;
  13. movl $(SYS_##x), %eax;
  14. int $0x80;
  15. jb 1b;
  16. ret;
  17. #else
  18. #define _SYSCALL(x)
  19. .globl _C_LABEL(machdep_sys_/**/x);
  20. _C_LABEL(machdep_sys_/**/x):;
  21. movl $(SYS_/**/x), %eax;
  22. int $0x80;
  23. jb 1b;
  24. ret;
  25. #endif
  26. /*
  27.  * Initial asm stuff for all functions.
  28.  */
  29. .text
  30. .align 2
  31. /* ==========================================================================
  32.  * error code for all syscalls. The error value is returned as the negative
  33.  * of the errno value.
  34.  */
  35. 1:
  36. neg %eax
  37. ret
  38. #define XSYSCALL(NAME) SYSCALL(NAME)
  39. XSYSCALL(SYSCALL_NAME)