syscall-sparc-sunos-5.3.S
上传用户:tsgydb
上传日期:2007-04-14
资源大小:10674k
文件大小:1k
源码类别:

MySQL数据库

开发平台:

Visual C++

  1. /* ==== syscall.S ============================================================
  2.  * Copyright (c) 1994 Chris Provenzano, proven@mit.edu
  3.  * All rights reserved.
  4.  *
  5.  */
  6. #ifndef lint
  7. .text
  8. .asciz "$Id$";
  9. #endif
  10.  
  11. #define _ASM
  12. #include <sys/syscall.h>
  13. /*
  14.  * Initial asm stuff for all functions.
  15.  */
  16. .text
  17. .align 4
  18. /* ==========================================================================
  19.  * error code for all syscalls. The error value is returned as the negative
  20.  * of the errno value.
  21.  */
  22. 1:
  23. sub %r0, %o0, %o0
  24. 2:
  25. retl
  26. nop
  27. /* ==========================================================================
  28.  * machdep_sys_fork()
  29.  */
  30.     .globl machdep_sys_fork;
  31. machdep_sys_fork:;
  32.     mov SYS_fork, %g1;
  33.     ta 0;
  34.     bcs 1b;
  35.     nop;
  36.     tst %o1
  37.     bne,a __fork_parent
  38.     mov  %g0, %o0
  39. __fork_parent:;
  40.     retl
  41.     nop; /* Added by monty to keep sparc assembler happy */
  42. /* ========================================================================== 
  43.  * Berkeley socket stuff
  44.  * 
  45.  * ==========================================================================
  46.  * machdep_sys_socketcall()
  47.  */
  48.     .globl machdep_sys_socketcall;
  49. machdep_sys_socketcall:;
  50. mov 83, %g1;   
  51. ta 0;
  52. bcs,a 2b;
  53. sub %r0,%o0,%o0;
  54. retl
  55. nop; /* Added by monty to keep sparc assembler happy */