syscall-template-i386-netbsd1.0.S
Upload User: tsgydb
Upload Date: 2007-04-14
Package Size: 10674k
Code Size: 1k
Category:

MySQL

Development Platform:

Visual C++

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