ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/rt/raypcalls.c
(Generate patch)

Comparing ray/src/rt/raypcalls.c (file contents):
Revision 2.3 by greg, Thu Jul 3 15:00:19 2003 UTC vs.
Revision 2.5 by schorsch, Sun Jul 27 22:12:03 2003 UTC

# Line 189 | Line 189 | ray_pflush()                   /* send queued rays to idle children */
189   {
190          int     nc, n, nw, i, sfirst;
191  
192 <        if ((ray_pnidle <= 0 | r_send_next <= 0))
192 >        if ((ray_pnidle <= 0) | (r_send_next <= 0))
193                  return(0);              /* nothing we can send */
194          
195          sfirst = 0;                     /* divvy up labor */
# Line 229 | Line 229 | RAY    *r;
229          if (sendq_full() && ray_pflush() <= 0)
230                  error(INTERNAL, "ray_pflush failed in ray_psend");
231  
232 <        copystruct(&r_queue[r_send_next], r);
232 >        r_queue[r_send_next] = *r;
233          r_send_next++;
234   }
235  
# Line 244 | Line 244 | RAY    *r;
244          if (sendq_full()) {
245                  RAY     mySend;
246                  int     rval;
247 <                copystruct(&mySend, r);
247 >                mySend = *r;
248                                          /* wait for a result */
249                  rval = ray_presult(r, 0);
250                                          /* put new ray in queue */
251 <                copystruct(&r_queue[r_send_next], &mySend);
251 >                r_queue[r_send_next] = mySend;
252                  r_send_next++;
253                  return(rval);           /* done */
254          }
255                                          /* add ray to send queue */
256 <        copystruct(&r_queue[r_send_next], r);
256 >        r_queue[r_send_next] = *r;
257          r_send_next++;
258                                          /* check for returned ray... */
259          if (r_recv_first >= r_recv_next)
260                  return(0);
261                                          /* ...one is sitting in queue */
262 <        copystruct(r, &r_queue[r_recv_first]);
262 >        *r = r_queue[r_recv_first];
263          r_recv_first++;
264          return(1);
265   }
# Line 279 | Line 279 | int    poll;
279                  return(0);
280                                          /* check queued results first */
281          if (r_recv_first < r_recv_next) {
282 <                copystruct(r, &r_queue[r_recv_first]);
282 >                *r = r_queue[r_recv_first];
283                  r_recv_first++;
284                  return(1);
285          }
# Line 354 | Line 354 | getready:                              /* any children waiting for us? */
354                  rp->slights = NULL;
355          }
356                                          /* return first ray received */
357 <        copystruct(r, &r_queue[r_recv_first]);
357 >        *r = r_queue[r_recv_first];
358          r_recv_first++;
359          return(1);
360   }
# Line 469 | Line 469 | int    nsub;
469                  return;
470          inclose++;
471                                          /* check argument */
472 <        if ((nsub <= 0 | nsub > ray_pnprocs))
472 >        if ((nsub <= 0) | (nsub > ray_pnprocs))
473                  nsub = ray_pnprocs;
474                                          /* clear our ray queue */
475          while (ray_presult(&res,0) > 0)

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines