gettid.c 121 B

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