37 |
|
static void killpersist(void); |
38 |
|
|
39 |
|
|
40 |
< |
extern int |
40 |
> |
int |
41 |
|
start_rtrace(void) /* start rtrace process */ |
42 |
|
{ |
43 |
|
static char buf1[8]; |
99 |
|
bestout(void) /* get best process to process packet */ |
100 |
|
{ |
101 |
|
int cnt; |
102 |
< |
register int pn, i; |
102 |
> |
int pn, i; |
103 |
|
|
104 |
|
pn = 0; /* find shortest queue */ |
105 |
|
for (i = 1; i < nprocs; i++) |
124 |
|
static int |
125 |
|
slots_avail(void) /* count packet slots available */ |
126 |
|
{ |
127 |
< |
register int nslots = 0; |
128 |
< |
register int i; |
127 |
> |
int nslots = 0; |
128 |
> |
int i; |
129 |
|
|
130 |
|
for (i = nprocs; i--; ) |
131 |
|
nslots += maxqlen - pqlen[i]; |
135 |
|
|
136 |
|
static void |
137 |
|
queue_packet( /* queue up a beam packet */ |
138 |
< |
register PACKET *p |
138 |
> |
PACKET *p |
139 |
|
) |
140 |
|
{ |
141 |
|
int pn, n; |
152 |
|
if (!pqlen[pn]++) /* add it to the end of the queue */ |
153 |
|
pqueue[pn] = p; |
154 |
|
else { |
155 |
< |
register PACKET *rpl = pqueue[pn]; |
155 |
> |
PACKET *rpl = pqueue[pn]; |
156 |
|
while (rpl->next != NULL) |
157 |
|
rpl = rpl->next; |
158 |
|
rpl->next = p; |
168 |
|
static struct timeval tpoll; /* zero timeval struct */ |
169 |
|
fd_set readset, errset; |
170 |
|
PACKET *pldone = NULL, *plend; |
171 |
< |
register PACKET *p; |
171 |
> |
PACKET *p; |
172 |
|
int n, nr; |
173 |
< |
register int pn; |
173 |
> |
int pn; |
174 |
|
float *bp; |
175 |
|
/* prepare select call */ |
176 |
|
FD_ZERO(&readset); FD_ZERO(&errset); n = 0; |
240 |
|
} |
241 |
|
|
242 |
|
|
243 |
< |
extern PACKET * |
243 |
> |
PACKET * |
244 |
|
do_packets( /* queue a packet list, return finished */ |
245 |
< |
register PACKET *pl |
245 |
> |
PACKET *pl |
246 |
|
) |
247 |
|
{ |
248 |
< |
register PACKET *p; |
248 |
> |
PACKET *p; |
249 |
|
/* consistency check */ |
250 |
|
if (nprocs < 1) |
251 |
|
error(CONSISTENCY, "do_packets called with no active process"); |
258 |
|
} |
259 |
|
|
260 |
|
|
261 |
< |
extern PACKET * |
261 |
> |
PACKET * |
262 |
|
flush_queue(void) /* empty all rtrace queues */ |
263 |
|
{ |
264 |
|
PACKET *rpdone = NULL; |
265 |
< |
register PACKET *rpl = NULL; |
265 |
> |
PACKET *rpl = NULL; |
266 |
|
float *bp; |
267 |
< |
register PACKET *p; |
267 |
> |
PACKET *p; |
268 |
|
int i, n, nr; |
269 |
|
|
270 |
|
for (i = 0; i < nprocs; i++) |
317 |
|
} |
318 |
|
|
319 |
|
|
320 |
< |
extern int |
320 |
> |
int |
321 |
|
end_rtrace(void) /* close rtrace process(es) */ |
322 |
|
{ |
323 |
|
int status = 0, rv; |