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
make vfs & filesystems use failable copying
[minix3.git]
/
lib
/
libsys
/
getprocnr.c
blob
2750aed30d912edc5b45856f358e482d748aee76
1
#include
"syslib.h"
2
#include <unistd.h>
3
#include <string.h>
4
5
int
6
getprocnr
(
pid_t pid
,
endpoint_t
*
proc_e
)
7
{
8
message m
;
9
int
r
;
10
11
memset
(&
m
,
0
,
sizeof
(
m
));
12
m
.
PM_GETPROCNR_PID
=
pid
;
13
14
if
((
r
=
_taskcall
(
PM_PROC_NR
,
PM_GETPROCNR
, &
m
)) <
0
)
15
return
r
;
16
17
*
proc_e
=
m
.
PM_GETPROCNR_ENDPT
;
18
return
r
;
19
}