home *** CD-ROM | disk | FTP | other *** search
/ The C Users' Group Library 1994 August / wc-cdrom-cusersgrouplibrary-1994-08.iso / listings / v_08_10 / 8n10120a < prev    next >
Text File  |  1990-08-29  |  2KB  |  49 lines

  1. /*      Simulation time available to programmer */
  2.  
  3. extern   long   unsigned   CurrentTime;
  4.  
  5.  
  6. /*    Starts the simulation after processes have benn created */
  7.  
  8. void               sim_start         (void);
  9.  
  10.  
  11. /*      Visible routine for process control   */
  12.  
  13. int               start_kb_process   (void   (*func)(void),int stacksize);
  14. int               start_process      (void   (*func)(void),int stacksize);
  15. void               stop_process      (int process_id);
  16. int               my_process_id      (void);
  17.  
  18.  
  19. /*      Visible routines for control of process time utilivation */
  20.  
  21. int               wait_until_time   (long unsigned   starttime);
  22. int               wait_for_time      (float   delaytime);
  23.  
  24.  
  25. /*      Sets the sim time to real time ratio - maximum running speed.
  26.       If this is set to 0.0, the system will run as fast as possible */
  27.  
  28. int               set_time_ratio      (float ratio);
  29.  
  30.  
  31. /*      Visible routines for the handling of posts */
  32.  
  33. int               init_post         (char   *postname);
  34. int               set_post          (int    posthandle,void   *pointer);
  35. void              *get_post            (int    posthandle);
  36. void              *wait_post         (int    posthandle);
  37.  
  38.  
  39. /*      Exiting the system, and cleaning up the interrupts
  40.       reports the value of the exit condition before
  41.       exiting, useful for signalling certain errors */
  42.  
  43. void               exit_processing   (int condition);
  44.  
  45.  
  46. #define _SECONDS_
  47. #define _MINUTES_ *60.0
  48. #define _HOURS_   *3600.0
  49.