mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-10 13:00:29 +03:00
Kernel: Disable big process lock for sys$clock_gettime()
This syscall doesn't touch any intra-process shared resources and reads the time via the atomic TimeManagement::current_time, so it doesn't need to hold any lock.
This commit is contained in:
parent
1a08694dfc
commit
fbd848e6eb
Notes:
sideshowbarker
2024-07-18 07:23:36 +09:00
Author: https://github.com/IdanHo Commit: https://github.com/SerenityOS/serenity/commit/fbd848e6ebc Pull-request: https://github.com/SerenityOS/serenity/pull/9236 Reviewed-by: https://github.com/tomuta ✅
@ -157,7 +157,7 @@ enum class NeedsBigProcessLock {
|
||||
S(getrandom, NeedsBigProcessLock::No) \
|
||||
S(getkeymap, NeedsBigProcessLock::No) \
|
||||
S(setkeymap, NeedsBigProcessLock::Yes) \
|
||||
S(clock_gettime, NeedsBigProcessLock::Yes) \
|
||||
S(clock_gettime, NeedsBigProcessLock::No) \
|
||||
S(clock_settime, NeedsBigProcessLock::Yes) \
|
||||
S(clock_nanosleep, NeedsBigProcessLock::Yes) \
|
||||
S(join_thread, NeedsBigProcessLock::Yes) \
|
||||
|
@ -12,7 +12,7 @@ namespace Kernel {
|
||||
|
||||
KResultOr<FlatPtr> Process::sys$clock_gettime(clockid_t clock_id, Userspace<timespec*> user_ts)
|
||||
{
|
||||
VERIFY_PROCESS_BIG_LOCK_ACQUIRED(this);
|
||||
VERIFY_NO_PROCESS_BIG_LOCK(this);
|
||||
REQUIRE_PROMISE(stdio);
|
||||
|
||||
if (!TimeManagement::is_valid_clock_id(clock_id))
|
||||
|
Loading…
Reference in New Issue
Block a user