DWORD id = GetCurrentThreadID();
#include <sys/syscall.h> #include <unistd.h> int id = syscall(SYS_getttid);
获取的线程id是通过gdb的info threads查到的线程id一致