Skip to content

Commit aa0265b

Browse files
kateinoigakukunal45tair
authored andcommitted
[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.
1 parent 124581a commit aa0265b

File tree

1 file changed

+1
-1
lines changed
  • include/swift/Threading/Impl/Linux

1 file changed

+1
-1
lines changed

include/swift/Threading/Impl/Linux/ulock.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ typedef std::int32_t ulock_t;
4646
inline int ulock_get_tid(void) {
4747
static __thread int tid;
4848
if (tid == 0)
49-
tid = gettid();
49+
tid = syscall(SYS_gettid);
5050
return tid;
5151
}
5252

0 commit comments

Comments
 (0)