// mc3_svc_proc.c - Implementation of remote procedures #include #include #include #include "mc.h" static volatile int total = 0; /* We will keep here the sum of the */ /* results of all the operations. */ static int v; int *add_1(mypair *p) { v = p->arg1+p->arg2; total += v; printf("Total = %d\n", total); return &v; } int *subtract_1(mypair *p) { v = p->arg1-p->arg2; total += v; printf("Total = %d\n", total); return &v; }