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

Comparing ray/src/rt/rcontrib.c (file contents):
Revision 2.1 by greg, Sat Jun 9 07:16:47 2012 UTC vs.
Revision 2.2 by greg, Sun Jun 10 05:25:42 2012 UTC

# Line 11 | Line 11 | static const char RCSid[] = "$Id$";
11   #include "otypes.h"
12   #include "platform.h"
13  
14 + char    *shm_boundary = NULL;           /* boundary of shared memory */
15 +
16   CUBE    thescene;                       /* our scene */
17   OBJECT  nsceneobjs;                     /* number of objects in our scene */
18  
# Line 222 | Line 224 | rcinit()
224          if (nproc > MAXPROCESS)
225                  sprintf(errmsg, "too many processes requested -- reducing to %d",
226                                  nproc = MAXPROCESS);
227 <                
227 >        if (nproc > 1) {
228 >                preload_objs();         /* preload auxiliary data */
229 >                                        /* set shared memory boundary */
230 >                shm_boundary = strcpy((char *)malloc(16), "SHM_BOUNDARY");
231 >        }
232          if ((nproc > 1) & (accumulate <= 0))
233 <                zero_record(0);         /* prime our queue to accumulate */
233 >                put_zero_record(0);     /* prime our queue to accumulate */
234  
235          if (recover) {                  /* recover previous output? */
236                  if (accumulate <= 0) {
237                          reload_output();
238 <                        if ((nproc > 1) & (accumulate <= 0))
238 >                        if (nproc > 1)
239                                  queue_modifiers();
240                  } else
241                          recover_output();
# Line 356 | Line 362 | rcontrib()
362          static int      ignore_warning_given = 0;
363          FVECT           orig, direc;
364          double          d;
365 <                                        /* initialize & fork */
365 >                                        /* initialize (& fork more of us) */
366          rcinit();
367                                          /* load rays from stdin & process */
368   #ifdef getc_unlocked
369 <        flockfile(stdin);               /* avoid lock/unlock overhead */
369 >        flockfile(stdin);               /* avoid mutex overhead */
370   #endif
371          while (getvec(orig) == 0 && getvec(direc) == 0) {
372                  d = normalize(direc);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines