3 * This file defines a set of utility routines for RPC services.
5 * $Log: rpcUtilPVM.C,v $
6 * Revision 1.2 1994/05/17 00:14:46 hollings
14 #include <util/h/rpcUtilPVM.h>
17 // Starts the 'program' on 'machine' and saves its thread id
19 PVMrpc::PVMrpc(char *where, char *program, char **argv, int flag)
23 if ((my_tid = pvm_mytid()) < 0)
27 if (pvm_spawn(program, argv, flag, where, 1, &other_tid) != 1)
33 // Accepts id of other thread
35 PVMrpc::PVMrpc(int other)
37 if ((my_tid = pvm_mytid()) < 0)
51 if ((my_tid = pvm_mytid()) < 0)
54 { if ((other_tid = pvm_parent()) < 0) pvm_error = -1;}
63 if (pvm_error == -1) return -1;
64 if ((bufid = pvm_probe(other_tid, -1)) < 0)
68 else if (other_tid == -1)
70 else if ((pvm_tasks(other_tid, &count, &tp) < 0) ||
72 (tp->ti_tid != other_tid))
73 return (pvm_probe (other_tid, -1));