/*
	Runtime Engine
		By Craig Kadziolka ( Nov 1999 - Dec 2000 )

	Modifications and copying is permitted providing this header
	is retained
*/

#include "tasks.h"
#include "../Interfaces/Threads.h"
#include "events.h"

void Init()
{
  /* Distributed specific stuff */
}

void task1()
{

 task1loop:
  
  write(1, "t1\n", 3);

  Suspend();

  goto task1loop;
  
}

void task2()
{

 task2loop:

  write(1, "t2\n", 3);
  
  Suspend();

  goto task2loop;

}

int Main()
{

  long int godzilla = 0;
  int count = 0;

  Create_Thread(1, 0, task1);
  Create_Thread(1, 0, task2);

 mainloop:

  if (count++ == 3) 
    exit(0);

  write(1, "t3\n", 3);
  
  Suspend();

  goto mainloop;
  
}
