minix/lib/other/_getprocnr.c
Jorrit Herder d0a5a5d007 New system call added to PM: getprocnr(int *proc_nr) (like getpid);
Minor update to scheduling code (unready().
2005-05-20 09:37:43 +00:00

15 lines
252 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;
if (_syscall(MM, GETPROCNR, &m) < 0) return(-1);
*proc_nr = m.m1_i1;
return(0);
}