1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-20 18:05:07 +00:00

Kernel: Remove system.h and make the uptime global a qword.

This commit is contained in:
Andreas Kling 2019-04-14 01:29:14 +02:00
parent c09c114d77
commit 29d0412a06
8 changed files with 13 additions and 27 deletions

View file

@ -3,7 +3,6 @@
#include "kmalloc.h"
#include "StdLib.h"
#include "i386.h"
#include "system.h"
#include <Kernel/FileSystem/FileDescriptor.h>
#include <Kernel/FileSystem/VirtualFileSystem.h>
#include <Kernel/Devices/NullDevice.h>
@ -1190,9 +1189,9 @@ int Process::sys$usleep(useconds_t usec)
return 0;
current->sleep(usec / 1000);
if (current->m_wakeup_time > system.uptime) {
if (current->m_wakeup_time > g_uptime) {
ASSERT(current->m_was_interrupted_while_blocked);
dword ticks_left_until_original_wakeup_time = current->m_wakeup_time - system.uptime;
dword ticks_left_until_original_wakeup_time = current->m_wakeup_time - g_uptime;
return ticks_left_until_original_wakeup_time / TICKS_PER_SECOND;
}
return 0;
@ -1203,9 +1202,9 @@ int Process::sys$sleep(unsigned seconds)
if (!seconds)
return 0;
current->sleep(seconds * TICKS_PER_SECOND);
if (current->m_wakeup_time > system.uptime) {
if (current->m_wakeup_time > g_uptime) {
ASSERT(current->m_was_interrupted_while_blocked);
dword ticks_left_until_original_wakeup_time = current->m_wakeup_time - system.uptime;
dword ticks_left_until_original_wakeup_time = current->m_wakeup_time - g_uptime;
return ticks_left_until_original_wakeup_time / TICKS_PER_SECOND;
}
return 0;