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.21 by greg, Sat Dec 12 00:03:42 2009 UTC vs.
Revision 2.22 by greg, Sat Dec 12 05:20:10 2009 UTC

# Line 154 | Line 154 | static const char      RCSid[] = "$Id$";
154  
155   extern char     *shm_boundary;          /* boundary of shared memory */
156  
157 int             ray_pfifo = 0;          /* maintain ray call order? */
157   int             ray_pnprocs = 0;        /* number of child processes */
158   int             ray_pnidle = 0;         /* number of idle children */
159  
# Line 169 | Line 168 | static struct child_proc {
168   static RAY      r_queue[2*RAYQLEN];     /* ray i/o buffer */
169   static int      r_send_next;            /* next send ray placement */
170   static int      r_recv_first;           /* position of first unreported ray */
171 < static int      r_recv_next;            /* next receive ray placement */
171 > static int      r_recv_next;            /* next received ray placement */
172  
173   #define sendq_full()    (r_send_next >= RAYQLEN)
174  
# Line 177 | Line 176 | static int ray_pflush(void);
176   static void ray_pchild(int fd_in, int fd_out);
177  
178  
179 < extern void
179 > void
180   ray_pinit(              /* initialize ray-tracing processes */
181          char    *otnm,
182          int     nproc
# Line 230 | Line 229 | ray_pflush(void)                       /* send queued rays to idle childre
229   }
230  
231  
232 < extern void
232 > void
233   ray_psend(                      /* add a ray to our send queue */
234          RAY     *r
235   )
# Line 245 | Line 244 | ray_psend(                     /* add a ray to our send queue */
244   }
245  
246  
247 < extern int
247 > int
248   ray_pqueue(                     /* queue a ray for computation */
249          RAY     *r
250   )
# Line 274 | Line 273 | ray_pqueue(                    /* queue a ray for computation */
273   }
274  
275  
276 < extern int
276 > int
277   ray_presult(            /* check for a completed ray */
278          RAY     *r,
279          int     poll
# Line 311 | Line 310 | getready:                              /* any children waiting for us? */
310                  if (FD_ISSET(r_proc[pn].fd_recv, &readset) ||
311                                  FD_ISSET(r_proc[pn].fd_recv, &errset))
312                          break;
313 <                                        /* call select if we must */
313 >                                        /* call select() if we must */
314          if (pn < 0) {
315                  FD_ZERO(&readset); FD_ZERO(&errset); n = 0;
316                  for (pn = ray_pnprocs; pn--; ) {
# Line 371 | Line 370 | getready:                              /* any children waiting for us? */
370   }
371  
372  
373 < extern void
373 > void
374   ray_pdone(              /* reap children and free data */
375          int     freall
376   )
# Line 435 | Line 434 | ray_pchild(    /* process rays (never returns) */
434   }
435  
436  
437 < extern void
437 > void
438   ray_popen(                      /* open the specified # processes */
439          int     nadd
440   )
# Line 485 | Line 484 | ray_popen(                     /* open the specified # processes */
484   }
485  
486  
487 < extern void
487 > void
488   ray_pclose(             /* close one or more child processes */
489          int     nsub
490   )

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines