e782e76944
functionality). Currently working on memory allocation (not yet finished).
15 lines
304 B
C
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);
|
|
}
|
|
|