repo.or.cz
/
minix.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Drop main() prototype. Syncs with NetBSD-8
[minix.git]
/
minix
/
lib
/
libsys
/
getprocnr.c
blob
ddaa52f375a1b87f3e84201d7d114eb0adc441a0
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
.
m_lsys_pm_getprocnr
.
pid
=
pid
;
13
14
if
((
r
=
_taskcall
(
PM_PROC_NR
,
PM_GETPROCNR
, &
m
)) <
0
)
15
return
r
;
16
17
*
proc_e
=
m
.
m_pm_lsys_getprocnr
.
endpt
;
18
return
r
;
19
}