Line | |
---|
1 | #include <lib.h>
|
---|
2 | #define _pm_findproc __pm_findproc
|
---|
3 | #include <unistd.h>
|
---|
4 | #include <string.h>
|
---|
5 |
|
---|
6 | PUBLIC int _pm_findproc(proc_name, proc_nr)
|
---|
7 | char *proc_name; /* name of process to search for */
|
---|
8 | int *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.