#include <sys/syscall.h>
// glibc >= 2.30 provides gettid() in unistd
#if !defined(__GLIBC_PREREQ) || !__GLIBC_PREREQ(2, 30)
static inline int gettid() { return syscall(SYS_gettid, 0, 0, 0); }
#endif
#include <sys/syscall.h>
// glibc >= 2.30 provides gettid() in unistd
#if !defined(__GLIBC_PREREQ) || !__GLIBC_PREREQ(2, 30)
static inline int gettid() { return syscall(SYS_gettid, 0, 0, 0); }
#endif