home *** CD-ROM | disk | FTP | other *** search
- /******************************************
- * GETPROC.C *
- * Copyright TimeSlice, Inc. 1985, 86, 87. *
- ******************************************/
-
-
- #include <ts.h>
- #include <stdio.h>
-
- /***
- * GETPROC( PROCNAME )
- * Return a PROCESS pointer to the first process (in the process list)
- * following curproc, having the name PROCNAME. Returns NULL if no
- * such process is found.
- ***/
- PROCESS *getproc( procname )
- char *procname;
- {
- PROCESS *pp;
-
- ssleep();
- pp = curproc;
- do {
- if( !strcmp( pp->name , procname ) ) {
- swake();
- return( pp );
- }
- pp = pp->nxt;
- } while ( pp != curproc );
- swake();
- return( NULL );
- }
-