home *** CD-ROM | disk | FTP | other *** search
/ Amiga ISO Collection / AmigaUtilCD2.iso / Programming / C / SASC6571.LZX / examples / multitask / process.h < prev    next >
Encoding:
C/C++ Source or Header  |  1996-12-24  |  1.1 KB  |  39 lines

  1. #define _USEOLDEXEC_ 1
  2.  
  3. #include <dos.h>
  4. #include <stdio.h>
  5. #include <string.h>
  6. #include <stdlib.h>
  7. #include <exec/memory.h>
  8. #include <libraries/dosextens.h>
  9. #include <exec/execbase.h>
  10. #include <proto/exec.h>
  11. #include <proto/dos.h>
  12.  
  13. extern struct ExecBase *SysBase;
  14.  
  15. struct FAKE_SegList {
  16.    long space;
  17.    long length;
  18.    BPTR nextseg;
  19.     short jmp;
  20.     void (*func)();
  21. };
  22.  
  23. struct ProcMsg {                        /* startup message sent to child */
  24.         struct Message msg;
  25.         long (*fp)();                    /* function we're going to call */
  26.         void *global_data;              /* global data reg (A4)         */
  27.         long return_code;               /* return code from process     */
  28.         struct FAKE_SegList *seg;       /* pointer to fake seglist so   */
  29.                                         /* can it can be free'd         */
  30.                                         /* user info can go here */
  31.         };
  32. extern long curdir;
  33.  
  34.  
  35. /* Prototypes */
  36. void process_starter(void);
  37. struct ProcMsg *start_process(long (*)(void), long, long);
  38. long wait_process(struct ProcMsg *);
  39.