minix/lib/other/_getprocnr.c
Jorrit Herder e782e76944 Created new findproc system call to the PM (to replace similar kernel
functionality). Currently working on memory allocation (not yet finished).
2005-06-02 12:43:21 +00:00

15 lines
304 B
C

#include <lib.h>
#define getprocnr _getprocnr
#include <unistd.h>
PUBLIC int getprocnr(proc_nr)
int *proc_nr; /* return process number here */
{
message m;
m.m1_i1 = 0; /* tell PM to get own process nr */
if (_syscall(MM, GETPROCNR, &m) < 0) return(-1);
*proc_nr = m.m1_i1;
return(0);
}