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