yeah
This commit is contained in:
+3
-3
@@ -7,7 +7,7 @@
|
||||
|
||||
static struct clock* active_clock = nullptr;
|
||||
static uint64_t counter_base = 0;
|
||||
static struct spinlock lock = {};
|
||||
static spinlock_t lock = {};
|
||||
|
||||
bool clock_available() {
|
||||
return active_clock != nullptr;
|
||||
@@ -31,7 +31,7 @@ bool clock_switch(struct clock* clock) {
|
||||
}
|
||||
}
|
||||
|
||||
printf("Switching to clock source \"%s\"\n", clock->name);
|
||||
kprintf("Switching to clock source \"%s\"\n", clock->name);
|
||||
|
||||
uint64_t elapsed = clock_get_elapsed_ns();
|
||||
counter_base += elapsed;
|
||||
@@ -43,7 +43,7 @@ bool clock_switch(struct clock* clock) {
|
||||
|
||||
void clock_spin_ns(uint64_t ns) {
|
||||
if (active_clock == nullptr) {
|
||||
printf("Unable to sleep for %lu ns, no clock available!\n", ns);
|
||||
kprintf("Unable to sleep for %lu ns, no clock available!\n", ns);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user