mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-26 17:40:27 +00:00
Kernel: Disable big process lock for sys$gettimeofday
This syscall doesn't touch any intra-process shared resources and only accesses the time via the atomic TimeManagement::now so there's no need to hold the big lock.
This commit is contained in:
parent
3ba2449058
commit
d40038a04f
Notes:
sideshowbarker
2024-07-18 07:23:29 +09:00
Author: https://github.com/IdanHo Commit: https://github.com/SerenityOS/serenity/commit/d40038a04f4 Pull-request: https://github.com/SerenityOS/serenity/pull/9236 Reviewed-by: https://github.com/tomuta ✅
2 changed files with 2 additions and 2 deletions
|
@ -64,7 +64,7 @@ enum class NeedsBigProcessLock {
|
|||
S(munmap, NeedsBigProcessLock::Yes) \
|
||||
S(get_dir_entries, NeedsBigProcessLock::Yes) \
|
||||
S(getcwd, NeedsBigProcessLock::Yes) \
|
||||
S(gettimeofday, NeedsBigProcessLock::Yes) \
|
||||
S(gettimeofday, NeedsBigProcessLock::No) \
|
||||
S(gethostname, NeedsBigProcessLock::No) \
|
||||
S(sethostname, NeedsBigProcessLock::No) \
|
||||
S(chdir, NeedsBigProcessLock::Yes) \
|
||||
|
|
|
@ -118,7 +118,7 @@ KResultOr<FlatPtr> Process::sys$adjtime(Userspace<const timeval*> user_delta, Us
|
|||
|
||||
KResultOr<FlatPtr> Process::sys$gettimeofday(Userspace<timeval*> user_tv)
|
||||
{
|
||||
VERIFY_PROCESS_BIG_LOCK_ACQUIRED(this);
|
||||
VERIFY_NO_PROCESS_BIG_LOCK(this);
|
||||
REQUIRE_PROMISE(stdio);
|
||||
auto tv = kgettimeofday().to_timeval();
|
||||
if (!copy_to_user(user_tv, &tv))
|
||||
|
|
Loading…
Reference in a new issue