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