ref: 463bbddb8d6cdc1fb3df8dce42b9b5e0afd3cedb dir: /sys/src/libc/9sys/getpid.c/
#include <u.h> #include <libc.h> #include <tos.h> int getpid(void) { return _tos->pid; }