repo.or.cz
/
minix3.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
. service tells you which device it couldn't stat
[minix3.git]
/
lib
/
other
/
_getnpid.c
blob
f9c03c27eb705f65b16cabdaea1537a5858f4f12
1
#include <lib.h>
2
#define getnpid _getnpid
3
#include <unistd.h>
4
5
PUBLIC pid_t
getnpid
(
int
proc_nr
)
6
{
7
message m
;
8
m
.
m1_i1
=
proc_nr
;
/* search pid for this process */
9
if
(
_syscall
(
MM
,
GETPID
, &
m
) <
0
)
return
( (
pid_t
) -
1
);
10
return
( (
pid_t
)
m
.
m2_i2
);
/* return search result */
11
}