00001 #include <lib.h> 00002 #define _pm_findproc __pm_findproc 00003 #include <unistd.h> 00004 #include <string.h> 00005 00006 PUBLIC int _pm_findproc(proc_name, proc_nr) 00007 char *proc_name; /* name of process to search for */ 00008 int *proc_nr; /* return process number here */ 00009 { 00010 message m; 00011 00012 m.m1_p1 = proc_name; 00013 m.m1_i1 = -1; /* search by name */ 00014 m.m1_i2 = strlen(proc_name) + 1; 00015 if (_syscall(MM, GETPROCNR, &m) < 0) return(-1); 00016 *proc_nr = m.m1_i1; 00017 return(0); 00018 } 00019
1.5.8