1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-20 13:25:08 +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:
Idan Horowitz 2021-08-06 14:58:28 +03:00 committed by Andreas Kling
parent 3ba2449058
commit d40038a04f
2 changed files with 2 additions and 2 deletions

View file

@ -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))