1#define _GNU_SOURCE 2#include <unistd.h> 3#include "pthread_impl.h" 4 5pid_t gettid(void) 6{ 7 return __pthread_self()->tid; 8}