mirror of
https://github.com/justinian/jsix.git
synced 2025-12-10 08:24:32 -08:00
Use uintptr_t instead of addr_t
They're never actually going to change independently, and it's also brining in kutil headers more places than they should be.
This commit is contained in:
@@ -1,7 +1,8 @@
|
||||
#pragma once
|
||||
/// \file scheduler.h
|
||||
/// The task scheduler and related definitions
|
||||
#include "kutil/memory.h"
|
||||
|
||||
#include <stdint.h>
|
||||
#include "kutil/slab_allocator.h"
|
||||
#include "process.h"
|
||||
|
||||
@@ -9,7 +10,7 @@ class lapic;
|
||||
struct page_table;
|
||||
struct cpu_state;
|
||||
|
||||
extern "C" addr_t isr_handler(addr_t, cpu_state);
|
||||
extern "C" uintptr_t isr_handler(uintptr_t, cpu_state);
|
||||
|
||||
|
||||
/// The task scheduler
|
||||
@@ -42,7 +43,7 @@ public:
|
||||
/// Run the scheduler, possibly switching to a new task
|
||||
/// \arg rsp0 The stack pointer of the current interrupt handler
|
||||
/// \returns The stack pointer to switch to
|
||||
addr_t schedule(addr_t rsp0);
|
||||
uintptr_t schedule(uintptr_t rsp0);
|
||||
|
||||
/// Get the current process.
|
||||
/// \returns A pointer to the current process' process struct
|
||||
@@ -58,13 +59,13 @@ public:
|
||||
static scheduler & get() { return s_instance; }
|
||||
|
||||
private:
|
||||
friend addr_t syscall_dispatch(addr_t, const cpu_state &);
|
||||
friend addr_t isr_handler(addr_t, cpu_state);
|
||||
friend uintptr_t syscall_dispatch(uintptr_t, const cpu_state &);
|
||||
friend uintptr_t isr_handler(uintptr_t, cpu_state);
|
||||
|
||||
/// Handle a timer tick
|
||||
/// \arg rsp0 The stack pointer of the current interrupt handler
|
||||
/// \returns The stack pointer to switch to
|
||||
addr_t tick(addr_t rsp0);
|
||||
uintptr_t tick(uintptr_t rsp0);
|
||||
|
||||
void prune(uint64_t now);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user