| 22 |
|
|
| 23 |
|
static RAY queued_ray; |
| 24 |
|
|
| 25 |
< |
extern void |
| 25 |
> |
void |
| 26 |
|
ray_pinit( /* initialize ray-tracing processes */ |
| 27 |
|
char *otnm, |
| 28 |
|
int nproc |
| 34 |
|
} |
| 35 |
|
|
| 36 |
|
|
| 37 |
< |
extern void |
| 37 |
> |
int |
| 38 |
|
ray_psend( /* add a ray to our send queue */ |
| 39 |
|
RAY *r |
| 40 |
|
) |
| 41 |
|
{ |
| 42 |
|
if (r == NULL) |
| 43 |
< |
return; |
| 43 |
> |
return(0); |
| 44 |
|
if (ray_pnidle <= 0) |
| 45 |
< |
error(INTERNAL, "illegal call to ray_psend"); |
| 45 |
> |
return(0); |
| 46 |
|
queued_ray = *r; |
| 47 |
|
ray_pnidle = 0; |
| 48 |
+ |
return(1); |
| 49 |
|
} |
| 50 |
|
|
| 51 |
|
|
| 52 |
< |
extern int |
| 52 |
> |
int |
| 53 |
|
ray_pqueue( /* queue a ray for computation */ |
| 54 |
|
RAY *r |
| 55 |
|
) |
| 67 |
|
} |
| 68 |
|
|
| 69 |
|
|
| 70 |
< |
extern int |
| 70 |
> |
int |
| 71 |
|
ray_presult( /* check for a completed ray */ |
| 72 |
|
RAY *r, |
| 73 |
|
int poll |
| 86 |
|
} |
| 87 |
|
|
| 88 |
|
|
| 89 |
< |
extern void |
| 89 |
> |
void |
| 90 |
|
ray_pdone( /* reap children and free data */ |
| 91 |
|
int freall |
| 92 |
|
) |
| 96 |
|
} |
| 97 |
|
|
| 98 |
|
|
| 99 |
< |
extern void |
| 99 |
> |
void |
| 100 |
|
ray_popen( /* open the specified # processes */ |
| 101 |
|
int nadd |
| 102 |
|
) |
| 103 |
|
{ |
| 104 |
|
if (ray_pnprocs + nadd > 1) { |
| 105 |
< |
error(WARNING, "Only single process supported"); |
| 105 |
> |
error(WARNING, "only single process supported"); |
| 106 |
|
nadd = 1 - ray_pnprocs; |
| 107 |
|
} |
| 108 |
|
ray_pnprocs += nadd; |
| 110 |
|
} |
| 111 |
|
|
| 112 |
|
|
| 113 |
< |
extern void |
| 113 |
> |
void |
| 114 |
|
ray_pclose( /* close one or more child processes */ |
| 115 |
|
int nsub |
| 116 |
|
) |