source: trunk/minix/lib/other/_getnpid.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: 283 bytes
Line 
1#include <lib.h>
2#define getnpid _getnpid
3#include <unistd.h>
4
5PUBLIC 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}
Note: See TracBrowser for help on using the repository browser.