home *** CD-ROM | disk | FTP | other *** search
/ Aminet 18 / aminetcdnumber181997.iso / Aminet / dev / gcc / ixemulsrc.lha / ixemul / include / ix_amiga.h < prev    next >
C/C++ Source or Header  |  1996-12-11  |  3KB  |  90 lines

  1. #ifndef __IX_AMIGA_H
  2. #define __IX_AMIGA_H
  3.  
  4. /* This header provides prototypes for Amiga specific functions available
  5.  * in ixemul.library or libc.a.
  6.  *
  7.  * Each function is also documented in this header (or will be). Sometimes an Amiga
  8.  * extension is described here, but for ease of use the original prototype
  9.  * or macro is defined elsewhere.
  10.  *
  11.  */
  12.  
  13. /* Like vfork(), but the memory that the child allocates will be owned by
  14.    the child. vfork() uses the parent's memory list, but since vfork2() is
  15.    used as a fork() emulation, this would be undesirable, not in the least
  16.    because that memory wouldn't be released until the parent exits. Causing
  17.    a huge memory leak. */
  18.  
  19. int vfork2(void);
  20.  
  21. /* Obsolete function to pass pointers to the _ctype_ array and the sys_nerr
  22.    variable from ixemul to the program. Do not use, use ix_get_vars2()
  23.    instead. */
  24.  
  25. /* void ix_get_vars(char **ctype, int *_sys_nerr); */
  26.  
  27. void ix_get_vars2 (int argc, char **ctype, int *_sys_nerr, 
  28.                 struct Library **sysbase, struct Library **dosbase,
  29.                 FILE ***fpp, char ***environ_out, char ***environ_in,
  30.                 int *real_errno, int *real_h_errno, struct __res_state *_res,
  31.                 int *_res_socket);
  32.  
  33. /*
  34.  * This is a wrapper intended to make life just a little bit easier for those
  35.  * who need to use the vfork2()/vfork_resume() trick.  It replaces the old
  36.  * 'ix_resident()/ix_get_vars2()' pair.
  37.  */
  38.  
  39. void vfork_setup_child (void);
  40.  
  41. /*
  42.  * This is an implementation extension to the `real' vfork2(). Normally you
  43.  * can only cause the parent to resume by calling _exit() or execve() from
  44.  * the child. Since I can't provide a real fork() on the Amiga, this function
  45.  * is a third possibility to make the parent resume. You have then two
  46.  * concurrent processes sharing the same frame and global data... Please be
  47.  * EXTREMELY careful what you may do and what not. vfork2() itself is a hack,
  48.  * this is an even greater one...
  49.  *
  50.  * DO NOT use this function in combination with vfork(), or you'll get a big
  51.  * memory leak. Only use it with vfork2().
  52.  */
  53.  
  54. void vfork_resume (void);
  55.  
  56. #if 0
  57. /* TODO */
  58. use geta4 in callbacks installed using funopen() when -resident
  59. SYSTEM_CALL (CreateExtIO, 27)
  60. SYSTEM_CALL (CreatePort, 28)
  61. SYSTEM_CALL (CreateStdIO, 29)
  62. SYSTEM_CALL (CreateTask, 30)
  63. SYSTEM_CALL (DeleteExtIO, 31)
  64. SYSTEM_CALL (DeletePort, 32)
  65. SYSTEM_CALL (DeleteStdIO, 33)
  66. SYSTEM_CALL (DeleteTask, 34)
  67. O_CASE
  68. achmod
  69. __amiga_filehandle
  70. ix_resident
  71. ix_geta4
  72. ix_check_cpu
  73. tracecntl
  74. SYSTEM_CALL (ix_get_gmt_offset, 473)
  75. SYSTEM_CALL (ix_set_gmt_offset, 474)
  76. SYSTEM_CALL (ix_get_default_settings, 475)
  77. SYSTEM_CALL (ix_get_settings, 476)
  78. SYSTEM_CALL (ix_set_settings, 477)
  79. SYSTEM_CALL (__init_stk_limit, 480)
  80. SYSTEM_CALL (__stkovf, 481)
  81. SYSTEM_CALL (__stkext, 482)
  82. SYSTEM_CALL (__stkext_f, 483)
  83. SYSTEM_CALL (__stkrst, 484)
  84. aselect
  85. ix_get_variables
  86.  
  87. #endif
  88.  
  89. #endif
  90.