gettid(2) System Calls Manual gettid(2) gettid - C (libc, -lc) #define _GNU_SOURCE #include pid_t gettid(void); gettid() (TID). (PID, getpid(2)). PID, TID. . CLONE_THREAD clone(2). . . Linux. Linux 2.4.11, glibc 2.30. , , POSIX (.., , pthread_self(3)). , clone(2) CLONE_THREAD ( , fork(2)), , ID (, getpid(2)) ID (, gettid()). capget(2), clone(2), fcntl(2), fork(2), get_robust_list(2), getpid(2), ioprio_set(2), perf_event_open(2), sched_setaffinity(2), sched_setparam(2), sched_setscheduler(2), tgkill(2), timer_create(2) () Azamat Hackimov , Dmitry Bolkhovskikh , Vladislav , Yuri Kozlov , Kirill Rekhov ; GNU (GNU General Public License - GPL, 3 ) , - . - , , () () () <>. Linux 6.9.1 2 2024 . gettid(2)