minix3/lib/libc/sys/getpid.c

15 lines
217 B
C

#include <sys/cdefs.h>
#include "namespace.h"
#include <lib.h>
#include <string.h>
#include <unistd.h>
pid_t getpid(void)
{
message m;
memset(&m, 0, sizeof(m));
return(_syscall(PM_PROC_NR, PM_GETPID, &m));
}