[Threading] Use raw gettid syscall for older glibc compatibility

`gettid` wrapper was added in glibc 2.30, and Ubuntu 18.04 uses glibc
2.27, so use raw syscall instead of it.
This commit is contained in:
Yuta Saito
2022-06-02 06:25:37 +00:00
parent 4967cd58a1
commit ead6e3dca7

View File

@@ -46,7 +46,7 @@ typedef std::int32_t ulock_t;
inline int ulock_get_tid(void) {
static __thread int tid;
if (tid == 0)
tid = gettid();
tid = syscall(SYS_gettid);
return tid;
}