mirror of
https://github.com/justinian/jsix.git
synced 2025-12-10 00:14:32 -08:00
[kernel] Use the hpet clock source in scheduler
There has been a global clock object for a while now, but scheduler was never using it, instead still using its simple increment clock. Now it uses the hpet clock.
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
#include "clock.h"
|
||||
#include "device_manager.h"
|
||||
#include "objects/endpoint.h"
|
||||
#include "objects/process.h"
|
||||
#include "objects/thread.h"
|
||||
#include "scheduler.h"
|
||||
#include "vm_space.h"
|
||||
|
||||
endpoint::endpoint() :
|
||||
@@ -64,7 +64,7 @@ endpoint::receive(j6_tag_t *tag, void *data, size_t *data_len, uint64_t timeout)
|
||||
|
||||
// Timeout is a duration, but wait_on_* calls need a time
|
||||
if (timeout)
|
||||
timeout += scheduler::get().clock();
|
||||
timeout += clock::get().value();
|
||||
|
||||
if (!check_signal(j6_signal_endpoint_can_recv)) {
|
||||
assert_signal(j6_signal_endpoint_can_send);
|
||||
|
||||
Reference in New Issue
Block a user