463 |
|
done_packets(pl) /* handle finished packets */ |
464 |
|
PACKET *pl; |
465 |
|
{ |
466 |
< |
static int nunflushed = 0; |
466 |
> |
static int n2flush = 0; |
467 |
|
register PACKET *p; |
468 |
|
|
469 |
|
while (pl != NULL) { |
474 |
|
p->nr*sizeof(RAYVAL)); |
475 |
|
if (outdev != NULL) /* display it */ |
476 |
|
disp_packet((PACKHEAD *)p); |
477 |
< |
else |
478 |
< |
nunflushed += p->nr; |
477 |
> |
if (hdcachesize <= 0) /* manual flushing */ |
478 |
> |
n2flush += p->nr; |
479 |
|
nraysdone += p->nr; |
480 |
|
npacksdone++; |
481 |
|
} |
483 |
|
p->next = freepacks; |
484 |
|
freepacks = p; |
485 |
|
} |
486 |
< |
if (nunflushed >= 256*RPACKSIZ) { |
486 |
> |
if (n2flush > 512*RPACKSIZ*ncprocs) { |
487 |
|
hdflush(NULL); /* flush holodeck buffers */ |
488 |
< |
nunflushed = 0; |
488 |
> |
n2flush = 0; |
489 |
|
} |
490 |
|
} |
491 |
|
|