mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[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:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user