source: trunk/minix/lib/other/__pm_findproc.c@ 9

Last change on this file since 9 was 9, checked in by Mattia Monga, 13 years ago

Minix 3.1.2a

File size: 442 bytes
Line 
1#include <lib.h>
2#define _pm_findproc __pm_findproc
3#include <unistd.h>
4#include <string.h>
5
6PUBLIC int _pm_findproc(proc_name, proc_nr)
7char *proc_name; /* name of process to search for */
8int *proc_nr; /* return process number here */
9{
10 message m;
11
12 m.m1_p1 = proc_name;
13 m.m1_i1 = -1; /* search by name */
14 m.m1_i2 = strlen(proc_name) + 1;
15 if (_syscall(MM, GETPROCNR, &m) < 0) return(-1);
16 *proc_nr = m.m1_i1;
17 return(0);
18}
19
Note: See TracBrowser for help on using the repository browser.