1 |
< |
/* Copyright (c) 1998 Silicon Graphics, Inc. */ |
1 |
> |
/* Copyright (c) 1999 Silicon Graphics, Inc. */ |
2 |
|
|
3 |
|
#ifndef lint |
4 |
|
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 |
153 |
|
if (gotsig++) /* two signals and we're gone! */ |
154 |
|
_exit(signo); |
155 |
|
|
156 |
< |
alarm(120); /* allow 2 minutes to clean up */ |
156 |
> |
alarm(180); /* allow 3 minutes to clean up */ |
157 |
|
signal(SIGALRM, SIG_DFL); /* make certain we do die */ |
158 |
|
eputs("signal - "); |
159 |
|
eputs(sigerr[signo]); |
514 |
|
p->nr*sizeof(RAYVAL)); |
515 |
|
if (outdev != NULL) /* display it */ |
516 |
|
disp_packet((PACKHEAD *)p); |
517 |
< |
if (hdcachesize <= 0) /* manual flushing */ |
517 |
> |
if (hdcachesize <= 0) { |
518 |
> |
#if RTFLUSH |
519 |
> |
if (outdev == NULL) |
520 |
> |
hdfreebeam(hdlist[p->hd], p->bi); |
521 |
> |
#endif |
522 |
|
n2flush++; |
523 |
+ |
} |
524 |
|
nraysdone += p->nr; |
525 |
|
npacksdone++; |
526 |
|
p->nr = 0; |
533 |
|
#else |
534 |
|
if (n2flush > 50*totqlen) { |
535 |
|
#endif |
536 |
< |
if (outdev == NULL) |
537 |
< |
hdflush(NULL); /* flush holodeck buffers */ |
536 |
> |
#if RTFLUSH |
537 |
> |
hdsync(NULL, outdev!=NULL); /* sync beams & directories */ |
538 |
> |
#else |
539 |
> |
if (outdev != NULL) |
540 |
> |
hdsync(NULL, 1); |
541 |
|
else |
542 |
< |
hdsync(NULL, 1); /* sync holodeck file */ |
542 |
> |
hdflush(NULL); |
543 |
> |
#endif |
544 |
|
n2flush = 0; |
545 |
|
} |
546 |
|
} |