
192 Chapter 11
39 /************************************************
40 * sum -- Sum the sine of the numbers from 0 to *
41 * 0x3FFFFFFF. Actually we don't care *
42 * about the answer, all we're trying to *
43 * do is create some sort of compute *
44 * bound job so that the status_monitor *
45 * can be demonstrated. *
46 ************************************************/
47 static void sum(void) {
48 static double sum = 0; /* Sum so far */
49
50 for (counter = 0;
51 counter < 0x3FFFFFF;
52 ++counter)
53 {
54 sum += sin(double(counter));
55 }
56
57 printf("Total %f\n", sum);
58 exit (0);
59 }
60
61 int main() {
62 // Status of last system call
63 int status;
64
65 // I ...