linux下获取线程号

#include <sys/syscall.h> 
pid_t gettid()
{
    return syscall(SYS_gettid); 
}


原文地址:https://www.cnblogs.com/whuqin/p/4982002.html