home *** CD-ROM | disk | FTP | other *** search
/ Il CD di internet / CD.iso / SOURCE / D / LIBC / LIBC-4.6 / LIBC-4 / libc-linux / sysdeps / linux / i386 / libc_exit.c < prev    next >
Encoding:
C/C++ Source or Header  |  1994-03-05  |  310 b   |  18 lines

  1. #include <unistd.h>
  2. #include <sys/syscall.h>
  3.  
  4. void
  5. _exit(int exit_code)
  6. {
  7. #if defined(__PIC__) || defined(__pic__)
  8.     __asm__("pushl %%ebx\n\t"
  9.         "movl %%ecx,%%ebx\n\t"
  10.         "int $0x80\n\t"
  11.         "popl %%ebx"
  12.         ::"a" (SYS_exit),"c" (exit_code));
  13. #else
  14.     __asm__("int $0x80"
  15.         ::"a" (SYS_exit),"b" (exit_code));
  16. #endif
  17. }
  18.