mirror of
https://github.com/SerenityOS/serenity
synced 2024-10-05 23:50:21 +00:00
LibC: Remove thread-specific TID cache
As Sergey pointed out forever ago, this value is wrong after fork().
This commit is contained in:
parent
8088fa0556
commit
9bf1fe9439
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue