mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-21 20:15:17 +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
Notes:
sideshowbarker
2024-07-19 10:18:14 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/9bf1fe94399
1 changed files with 1 additions and 5 deletions
|
@ -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…
Add table
Reference in a new issue