home *** CD-ROM | disk | FTP | other *** search
/ The C Users' Group Library 1994 August / wc-cdrom-cusersgrouplibrary-1994-08.iso / listings / v_08_04 / 8n04119a < prev    next >
Text File  |  1990-03-20  |  549b  |  24 lines

  1. ***************
  2. ** Listing 4 **
  3. ***************
  4.  
  5. /*
  6.  
  7.   fork_start()    -- Start the forked routine
  8.  
  9.   This routine is used to call the forked routine.  It
  10.   passes the four bytes to the target routine and then
  11.   resumes the previous task, which should always be the
  12.   fork queue.                        */
  13.  
  14. void fork_start()
  15.   {
  16.   /* Call the routine, passing the long parameter and the
  17.      address of the working TSS.            */
  18.  
  19.   (*current_routine)(current_param, &fdummy_tcb);
  20.  
  21.   /* Task switch back to the fork queue task. */
  22.   resume_last();
  23.   }
  24.