320 |
* @return the named process or NULL if not found |
* @return the named process or NULL if not found |
321 |
*/ |
*/ |
322 |
Process_T get_process(char *name) { |
Process_T get_process(char *name) { |
323 |
|
|
324 |
Process_T p; |
Process_T p; |
325 |
|
|
326 |
ASSERT(name); |
ASSERT(name); |
327 |
|
|
328 |
for(p= processlist; p; p= p->next) |
for(p= processlist; p; p= p->next) { |
329 |
if(is(p->name, name)) |
if(is(p->name, name)) { |
330 |
return p; |
return p; |
331 |
|
} |
332 |
|
} |
333 |
|
|
334 |
return NULL; |
return NULL; |
335 |
|
|
342 |
* processlist, otherwise FALSE |
* processlist, otherwise FALSE |
343 |
*/ |
*/ |
344 |
int exist_process(char *name) { |
int exist_process(char *name) { |
345 |
|
|
346 |
Process_T p; |
Process_T p; |
347 |
|
|
348 |
ASSERT(name); |
ASSERT(name); |
610 |
* Print all the processes in the processlist |
* Print all the processes in the processlist |
611 |
*/ |
*/ |
612 |
void printprocesslist() { |
void printprocesslist() { |
613 |
|
|
|
char ruler[STRLEN]; |
|
614 |
Process_T p; |
Process_T p; |
615 |
|
char ruler[STRLEN]; |
616 |
|
|
617 |
printf("The process list contains the following entries:\n\n"); |
printf("The process list contains the following entries:\n\n"); |
618 |
|
|