#include #include "first.h" void * f_1_svc(int * x, struct svc_req * sr) { static int y; y = *x + 2; *x += 2; return &y; } int * g_1_svc(int * x , struct svc_req * sr) { *x += 1; return x; } void * withdraw_1_svc(transaction * x , struct svc_req * sr) { account *A; A = x->A; A->balance -= x->amt; return x; /* ignored */ } void * deposit_1_svc(transaction * x , struct svc_req * sr) { account *A; A = x->A; A->balance += x->amt; return x; /* ignored */ } int * inquiry_1_svc(account * a , struct svc_req * sr) { static int y; y = a->balance; return &y; } /* compile on Linux with gcc firsts.c first_svc.c first_clnt.c -o firsts */