Kernel: Disable big process lock for sys$gettid()

This syscall reads a read only value from the current thread, and hence
has no need for the big process lock.
This commit is contained in:
Brian Gianforcaro 2021-07-18 11:33:35 -07:00 committed by Gunnar Beutner
parent 638598b15d
commit 5c10fb4007
Notes: sideshowbarker 2024-07-18 08:42:31 +09:00
2 changed files with 2 additions and 2 deletions

View file

@ -126,7 +126,7 @@ enum class NeedsBigProcessLock {
S(getsockopt, NeedsBigProcessLock::Yes) \
S(setsockopt, NeedsBigProcessLock::Yes) \
S(create_thread, NeedsBigProcessLock::Yes) \
S(gettid, NeedsBigProcessLock::Yes) \
S(gettid, NeedsBigProcessLock::No) \
S(rename, NeedsBigProcessLock::Yes) \
S(ftruncate, NeedsBigProcessLock::Yes) \
S(exit_thread, NeedsBigProcessLock::Yes) \

View file

@ -228,7 +228,7 @@ KResultOr<FlatPtr> Process::sys$get_thread_name(pid_t tid, Userspace<char*> buff
KResultOr<FlatPtr> Process::sys$gettid()
{
VERIFY_PROCESS_BIG_LOCK_ACQUIRED(this)
VERIFY_NO_PROCESS_BIG_LOCK(this)
REQUIRE_PROMISE(stdio);
return Thread::current()->tid().value();
}