/*      Simulation time available to programmer */

extern   long   unsigned   CurrentTime;


/*    Starts the simulation after processes have benn created */

void               sim_start         (void);


/*      Visible routine for process control   */

int               start_kb_process   (void   (*func)(void),int stacksize);
int               start_process      (void   (*func)(void),int stacksize);
void               stop_process      (int process_id);
int               my_process_id      (void);


/*      Visible routines for control of process time utilivation */

int               wait_until_time   (long unsigned   starttime);
int               wait_for_time      (float   delaytime);


/*      Sets the sim time to real time ratio - maximum running speed.
      If this is set to 0.0, the system will run as fast as possible */

int               set_time_ratio      (float ratio);


/*      Visible routines for the handling of posts */

int               init_post         (char   *postname);
int               set_post          (int    posthandle,void   *pointer);
void              *get_post            (int    posthandle);
void              *wait_post         (int    posthandle);


/*      Exiting the system, and cleaning up the interrupts
      reports the value of the exit condition before
      exiting, useful for signalling certain errors */

void               exit_processing   (int condition);


#define _SECONDS_
#define _MINUTES_ *60.0
#define _HOURS_   *3600.0
