mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-27 01:50:24 +00:00
Kernel: Paper over SMAP violations in clock_{gettime,nanosleep}()
Just put some SmapDisablers here to unbreak the nesalizer port.
This commit is contained in:
parent
c5890afc8b
commit
2c3a6c37ac
Notes:
sideshowbarker
2024-07-19 10:19:32 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/2c3a6c37ac3
1 changed files with 2 additions and 0 deletions
|
@ -3738,6 +3738,7 @@ int Process::sys$clock_gettime(clockid_t clock_id, timespec* ts)
|
|||
if (!validate_write_typed(ts))
|
||||
return -EFAULT;
|
||||
|
||||
SmapDisabler disabler;
|
||||
switch (clock_id) {
|
||||
case CLOCK_MONOTONIC:
|
||||
ts->tv_sec = g_uptime / TICKS_PER_SECOND;
|
||||
|
@ -3770,6 +3771,7 @@ int Process::sys$clock_nanosleep(const Syscall::SC_clock_nanosleep_params* param
|
|||
|
||||
bool is_absolute = flags & TIMER_ABSTIME;
|
||||
|
||||
SmapDisabler disabler;
|
||||
switch (clock_id) {
|
||||
case CLOCK_MONOTONIC: {
|
||||
u64 wakeup_time;
|
||||
|
|
Loading…
Reference in a new issue