aboutsummaryrefslogtreecommitdiffstats
path: root/src/examples/child.c
blob: f39b18db82ba779bdb8b386c9abe86ac2f11fe8c (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
/* klaar@ida

   Just do some work, print a message, and then exit successfully.

   Normally called by some parent test program.
 */

#include <syscall.h>
#include <stdio.h>

int main (int argc, char* argv[])
{
  int i;
  
  if (argc != 2)
    return 0;
  
  for(i = 0; i < 20000; i++)
  {
    int a = (i * i) + (i * i);
    int b = i;
    i = a; a = b; i = b;
  }
  printf("PASS Lab %s ON Time.\n", argv[1]);

  return 0;
}