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