SyntaxFix
Write A Post
Hire A Developer
Questions
GDB uses the thread-id (aka kernel pid, aka LWP) for short numbers on Linux. Try:
#include <syscall.h> ... printf("tid = %d\n", syscall(SYS_gettid));