Kernel: Use FlatPtr for register-sized values

This commit is contained in:
Gunnar Beutner 2021-06-28 17:05:38 +02:00 committed by Andreas Kling
parent b5aad1c81d
commit a8587fbfb9
4 changed files with 5 additions and 5 deletions

View file

@ -437,7 +437,7 @@ public:
[[noreturn]] void initialize_context_switching(Thread& initial_thread);
NEVER_INLINE void switch_context(Thread*& from_thread, Thread*& to_thread);
[[noreturn]] static void assume_context(Thread& thread, FlatPtr flags);
u32 init_context(Thread& thread, bool leave_crit);
FlatPtr init_context(Thread& thread, bool leave_crit);
static Vector<FlatPtr> capture_stack_trace(Thread& thread, size_t max_frames = 0);
String platform_string() const;

View file

@ -44,7 +44,7 @@ extern "C" void exit_kernel_thread(void);
// Declare them, to avoid dead code warnings.
extern "C" void context_first_init(Thread* from_thread, Thread* to_thread, TrapFrame* trap) __attribute__((used));
extern "C" void enter_thread_context(Thread* from_thread, Thread* to_thread) __attribute__((used));
extern "C" u32 do_init_context(Thread* thread, u32 flags) __attribute__((used));
extern "C" FlatPtr do_init_context(Thread* thread, u32 flags) __attribute__((used));
UNMAP_AFTER_INIT static void sse_init()
{
@ -1223,7 +1223,7 @@ extern "C" void enter_thread_context(Thread* from_thread, Thread* to_thread)
// TODO: ioperm?
}
extern "C" u32 do_init_context(Thread* thread, u32 flags)
extern "C" FlatPtr do_init_context(Thread* thread, u32 flags)
{
VERIFY_INTERRUPTS_DISABLED();
#if ARCH(I386)

View file

@ -65,7 +65,7 @@ String Processor::platform_string() const
return "i386";
}
u32 Processor::init_context(Thread& thread, bool leave_crit)
FlatPtr Processor::init_context(Thread& thread, bool leave_crit)
{
VERIFY(is_kernel_mode());
VERIFY(g_scheduler_lock.is_locked());

View file

@ -67,7 +67,7 @@ String Processor::platform_string() const
}
// FIXME: For the most part this is a copy of the i386-specific function, get rid of the code duplication
u32 Processor::init_context(Thread& thread, bool leave_crit)
FlatPtr Processor::init_context(Thread& thread, bool leave_crit)
{
VERIFY(is_kernel_mode());
VERIFY(g_scheduler_lock.is_locked());