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

Comparing ray/src/hd/rholo.c (file contents):
Revision 3.44 by gwlarson, Wed Dec 30 08:02:37 1998 UTC vs.
Revision 3.47 by gwlarson, Wed Jan 20 13:28:49 1999 UTC

# Line 1 | Line 1
1 < /* Copyright (c) 1998 Silicon Graphics, Inc. */
1 > /* Copyright (c) 1999 Silicon Graphics, Inc. */
2  
3   #ifndef lint
4   static char SCCSid[] = "$SunId$ SGI";
# Line 14 | Line 14 | static char SCCSid[] = "$SunId$ SGI";
14   #include <sys/types.h>
15   #include <sys/stat.h>
16  
17 + #ifndef RTFLUSH
18 + #define RTFLUSH         0               /* flush one at a time in batch */
19 + #endif
20   #ifndef FRAGWARN
21   #define FRAGWARN        20              /* fragmentation for warning (%) */
22   #endif
# Line 147 | Line 150 | int  signo;
150   {
151          static int  gotsig = 0;
152  
153 <        if (gotsig++)                   /* two signals and we're gone! */
153 >        if (gotsig > 1)                 /* we're going as fast as we can! */
154 >                return;
155 >        if (gotsig++) {                 /* two signals and we split */
156 >                hdsync(NULL, 0);        /* don't leave w/o saying goodbye */
157                  _exit(signo);
158 <
159 <        alarm(60);                      /* allow 60 seconds to clean up */
154 <        signal(SIGALRM, SIG_DFL);       /* make certain we do die */
158 >        }
159 >        alarm(300);                     /* allow 5 minutes to clean up */
160          eputs("signal - ");
161          eputs(sigerr[signo]);
162          eputs("\n");
# Line 511 | Line 516 | PACKET *pl;
516                                  p->nr*sizeof(RAYVAL));
517                          if (outdev != NULL)     /* display it */
518                                  disp_packet((PACKHEAD *)p);
519 <                        if (hdcachesize <= 0)   /* manual flushing */
519 >                        if (hdcachesize <= 0) {
520 > #if RTFLUSH
521 >                                if (outdev == NULL)
522 >                                        hdfreebeam(hdlist[p->hd], p->bi);
523 > #endif
524                                  n2flush++;
525 +                        }
526                          nraysdone += p->nr;
527                          npacksdone++;
528                          p->nr = 0;
# Line 525 | Line 535 | PACKET *pl;
535   #else
536          if (n2flush > 50*totqlen) {
537   #endif
538 <                if (outdev == NULL)
539 <                        hdflush(NULL);          /* flush holodeck buffers */
538 > #if RTFLUSH
539 >                hdsync(NULL, outdev!=NULL);     /* sync beams & directories */
540 > #else
541 >                if (outdev != NULL)
542 >                        hdsync(NULL, 1);
543                  else
544 <                        hdsync(NULL, 1);        /* sync holodeck file */
544 >                        hdflush(NULL);
545 > #endif
546                  n2flush = 0;
547          }
548   }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines