summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2022-04-04 00:39:43 +0200
committerAndreas Kling <kling@serenityos.org>2022-04-04 00:42:18 +0200
commit12b612ab149282143c8e540ffdb02d6900a00d5d (patch)
treef373c867c83c3c0190bde40ecdfcc9c589dfa9f4
parent4306422f295d175ffd4ddeabf5cb2432b52723df (diff)
downloadserenity-12b612ab149282143c8e540ffdb02d6900a00d5d.zip
Kernel: Mark sys$adjtime() as not needing the big lock
This syscall works on global kernel state and so doesn't need protection from threads in the same process.
-rw-r--r--Kernel/API/Syscall.h2
-rw-r--r--Kernel/Syscalls/clock.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/Kernel/API/Syscall.h b/Kernel/API/Syscall.h
index a15c46648e..2408bea4f5 100644
--- a/Kernel/API/Syscall.h
+++ b/Kernel/API/Syscall.h
@@ -42,7 +42,7 @@ enum class NeedsBigProcessLock {
#define ENUMERATE_SYSCALLS(S) \
S(accept4, NeedsBigProcessLock::Yes) \
S(access, NeedsBigProcessLock::Yes) \
- S(adjtime, NeedsBigProcessLock::Yes) \
+ S(adjtime, NeedsBigProcessLock::No) \
S(alarm, NeedsBigProcessLock::Yes) \
S(allocate_tls, NeedsBigProcessLock::Yes) \
S(anon_create, NeedsBigProcessLock::No) \
diff --git a/Kernel/Syscalls/clock.cpp b/Kernel/Syscalls/clock.cpp
index 74af99263f..f3119c137e 100644
--- a/Kernel/Syscalls/clock.cpp
+++ b/Kernel/Syscalls/clock.cpp
@@ -93,7 +93,7 @@ ErrorOr<FlatPtr> Process::sys$clock_nanosleep(Userspace<Syscall::SC_clock_nanosl
ErrorOr<FlatPtr> Process::sys$adjtime(Userspace<timeval const*> user_delta, Userspace<timeval*> user_old_delta)
{
- VERIFY_PROCESS_BIG_LOCK_ACQUIRED(this);
+ VERIFY_NO_PROCESS_BIG_LOCK(this);
if (user_old_delta) {
timespec old_delta_ts = TimeManagement::the().remaining_epoch_time_adjustment();
timeval old_delta;