kernel: scheduling fix for ARM
[minix.git] / lib / libminlib / getprocnr.c
blob2f0d1e6fc36da6d33ccc29ab1fbf2da1140aae86
1 #include <lib.h>
2 #include <unistd.h>
5 int getprocnr()
7 message m;
8 m.m1_i1 = -1; /* don't pass pid to search for */
9 m.m1_i2 = 0; /* don't pass name to search for */
10 if (_syscall(PM_PROC_NR, GETPROCNR, &m) < 0) return(-1);
11 return(m.m1_i1); /* return own process number */