获取线程的tid #include <sys/syscall.h> char msg[32] = {0}; sprintf(msg,"tid:%d",syscall(SYS_gettid)); 来源:oschina链接:https://my.oschina.net/u/4149215/blog/4278064 标签 sprintf