2005-05-20 11:37:43 +02:00
|
|
|
#include <lib.h>
|
|
|
|
#define getprocnr _getprocnr
|
|
|
|
#include <unistd.h>
|
|
|
|
|
|
|
|
|
|
|
|
PUBLIC int getprocnr(proc_nr)
|
|
|
|
int *proc_nr; /* return process number here */
|
|
|
|
{
|
|
|
|
message m;
|
2005-06-02 14:43:21 +02:00
|
|
|
m.m1_i1 = 0; /* tell PM to get own process nr */
|
2005-05-20 11:37:43 +02:00
|
|
|
if (_syscall(MM, GETPROCNR, &m) < 0) return(-1);
|
|
|
|
*proc_nr = m.m1_i1;
|
|
|
|
return(0);
|
|
|
|
}
|
|
|
|
|