I think tasks can be considered programs now. So, gettid() is equal to getpid(). In fact, it should be renamed. And moved to unistd.h. Soon.