LibC: Remove thread-specific TID cache

As Sergey pointed out forever ago, this value is wrong after fork().
This commit is contained in:
Andreas Kling 2020-01-06 14:38:48 +01:00
parent 8088fa0556
commit 9bf1fe9439
Notes: sideshowbarker 2024-07-19 10:18:14 +09:00

View File

@ -527,13 +527,9 @@ int ftruncate(int fd, off_t length)
__RETURN_WITH_ERRNO(rc, rc, -1);
}
__thread int t_cached_tid = -1;
int gettid()
{
if (t_cached_tid == -1)
t_cached_tid = syscall(SC_gettid);
return t_cached_tid;
return syscall(SC_gettid);
}
int donate(int tid)