- protdescr *ptr;
- word pnum, plen, node, apt;
- message msg;
-
- ptr = prototype[ M[ am+PROTNUM ] ];
- apt = am+M[ am ];
- if (ptr->kind == PROCESS) /* new process creation */
- {
- thisp->template.addr = ah; /* save template address */
- thisp->template.mark = M[ ah+1 ];
- msg.control.type = CREATE;
- msg.control.par = M[ am+PROTNUM ];
- moveparams(thispix, am, &msg, PARIN, LOADPAR);
- msg.control.receiver.pix = 0; /* pix will create receiver */
- msg.control.receiver.mark= 0; /* mark will create receiver */
- msg.control.receiver.node = getnode(am); /* node we decided */
- sendmsg1( &msg); /* send create request */
-# ifdef RPCDBG
- fprintf(
- stderr, "send new process from %d to node %d\n",
- thispix,
- msg.control.receiver.node
- );
-# endif
- passivate(WAITFORNEW); /* and wait for return from process */
- }
- else
- if (isprocess((virtaddr*)(M+apt+SL))) /* remote procedure call */
- {
- thisp->backobj.addr = ah; /* save template address */
- thisp->backobj.mark = M[ ah+1 ];
- thisp->M[ temporary ] = am; /* physical address also */
- {
- virtaddr v;
- loadvirt( v, apt+SL );
- obj2mess( M, &v, &msg.control.receiver );
-
- /* fprintf(
- stderr, "send rpc from process %d to (%d,%d,%d)\n",
- thispix,
- msg.control.receiver.node,
- msg.control.receiver.pix,
- msg.control.receiver.mark
- );*/
-
- }
- msg.control.type = RPCALL;
- msg.control.par = M[ am+PROTNUM ];
- moveparams(thispix, am, &msg, PARIN, LOADPAR);
- sendmsg1( &msg); /* send RPC request */
- passivate(WAITFORRPC); /* and wait for RP return */
- }
- else
- {
- M[ c1+M[ c1 ]+LSC ] = ic; /* save local control */
- loosen(); /* release DISPLAY */
- update(am, ah); /* update DISPLAY */
- c1 = am; /* new current */
- c2 = c1+ptr->span;
- pnum = ptr->preflist;
- plen = ptr->lthpreflist;
- while (TRUE) /* search for executable prefix */
- if (plen <= 1)
- {
- ic = ptr->codeaddr;
- break;
- }
- else
+ protdescr *ptr;
+ word pnum, plen, node, apt;
+ message msg;
+
+ ptr = prototype[M[am + PROTNUM]];
+ apt = am + M[am];
+ /* new process creation */
+ if (ptr->kind == PROCESS) {
+ /* save template address */
+ thisp->template.addr = ah;
+ thisp->template.mark = M[ah + 1];
+ msg.control.type = CREATE;
+ msg.control.par = M[am + PROTNUM];
+ moveparams(thispix, am, &msg, PARIN, LOADPAR);
+ /* pix will create receiver */
+ msg.control.receiver.pix = 0;
+ /* mark will create receiver */
+ msg.control.receiver.mark= 0;
+ /* node we decided */
+ msg.control.receiver.node = getnode(am);
+ /* send create request */
+ sendmsg1(&msg);
+#ifdef RPCDBG
+ fprintf(stderr, "send new process from %d to node %d\n",
+ thispix, msg.control.receiver.node);
+#endif
+ /* and wait for return from process */
+ passivate(WAITFORNEW);
+ } else if (isprocess((virtaddr*)(M+apt+SL))) {
+ /* remote procedure call */
+ /* save template address */
+ thisp->backobj.addr = ah;
+ thisp->backobj.mark = M[ah + 1];
+ /* physical address also */
+ thisp->M[temporary] = am;