diff options
author | Andreas Kling <kling@serenityos.org> | 2023-04-02 21:36:39 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2023-04-04 10:33:42 +0200 |
commit | ed1253ab900cf8aec5dc57fb4d5311f22cc5ce9f (patch) | |
tree | 9f20a202bbf95d4d9360b9a35130bf802e71f40d /Kernel/ExecutionMode.h | |
parent | c3915e4058341570e746979a69ce6696de232da5 (diff) | |
download | serenity-ed1253ab900cf8aec5dc57fb4d5311f22cc5ce9f.zip |
Kernel: Don't ref/unref the holder thread in Mutex
There was a whole bunch of ref counting churn coming from Mutex, which
had a RefPtr<Thread> m_holder to (mostly) point at the thread holding
the mutex.
Since we never actually dereference the m_holder value, but only use it
for identity checks against thread pointers, we can store it as an
uintptr_t and skip the ref counting entirely.
Threads can't die while holding a mutex anyway, so there's no risk of
them going missing on us.
Diffstat (limited to 'Kernel/ExecutionMode.h')
0 files changed, 0 insertions, 0 deletions