#include <stdio.h>
#include "parc.h"

using namespace parc;

module top {
public:
  top() {i = 1;}
  void foo(int c);  int i,j;

  process p1 {
  start:
    j = 2;
    while (i < 5) {
      printf("%d\n",i); wait(5); i += 2;
    }
  } a;

  process p2 {
  start:
    wait(2);
    printf("%d\n",j); 
    suspend();
  } b;

};

void test()
{
  top t;

  root()->StartAll();
}

int main(int argc,char **argv)
{
  test();
}