summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Gianforcaro <bgianf@serenityos.org>2021-07-18 11:37:07 -0700
committerGunnar Beutner <gunnar@beutner.name>2021-07-20 03:21:14 +0200
commit8f01a8b741dff6a2983fbbb0a1023e4d35aa1b19 (patch)
treeaa6999436e04a04ca17f8a6c79c3d31886eee93f
parent5c10fb4007748374640f1db27190946e45422921 (diff)
downloadserenity-8f01a8b741dff6a2983fbbb0a1023e4d35aa1b19.zip
Kernel: Disable big process lock for sys$yield()
-rw-r--r--Kernel/API/Syscall.h2
-rw-r--r--Kernel/Syscalls/sched.cpp4
2 files changed, 3 insertions, 3 deletions
diff --git a/Kernel/API/Syscall.h b/Kernel/API/Syscall.h
index 80b5506954..6377d38479 100644
--- a/Kernel/API/Syscall.h
+++ b/Kernel/API/Syscall.h
@@ -43,7 +43,7 @@ enum class NeedsBigProcessLock {
// - VERIFY_NO_PROCESS_BIG_LOCK(this)
//
#define ENUMERATE_SYSCALLS(S) \
- S(yield, NeedsBigProcessLock::Yes) \
+ S(yield, NeedsBigProcessLock::No) \
S(open, NeedsBigProcessLock::Yes) \
S(close, NeedsBigProcessLock::Yes) \
S(read, NeedsBigProcessLock::Yes) \
diff --git a/Kernel/Syscalls/sched.cpp b/Kernel/Syscalls/sched.cpp
index 9d9310ce96..5c1aa67b79 100644
--- a/Kernel/Syscalls/sched.cpp
+++ b/Kernel/Syscalls/sched.cpp
@@ -10,9 +10,9 @@ namespace Kernel {
KResultOr<FlatPtr> Process::sys$yield()
{
- VERIFY_PROCESS_BIG_LOCK_ACQUIRED(this)
+ VERIFY_NO_PROCESS_BIG_LOCK(this);
REQUIRE_PROMISE(stdio);
- Thread::current()->yield_and_release_relock_big_lock();
+ Thread::current()->yield_assuming_not_holding_big_lock();
return 0;
}