mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 05:07:34 +00:00
Kernel: Use FlatPtr for register-sized values
This commit is contained in:
parent
b5aad1c81d
commit
a8587fbfb9
4 changed files with 5 additions and 5 deletions
|
@ -437,7 +437,7 @@ public:
|
||||||
[[noreturn]] void initialize_context_switching(Thread& initial_thread);
|
[[noreturn]] void initialize_context_switching(Thread& initial_thread);
|
||||||
NEVER_INLINE void switch_context(Thread*& from_thread, Thread*& to_thread);
|
NEVER_INLINE void switch_context(Thread*& from_thread, Thread*& to_thread);
|
||||||
[[noreturn]] static void assume_context(Thread& thread, FlatPtr flags);
|
[[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);
|
static Vector<FlatPtr> capture_stack_trace(Thread& thread, size_t max_frames = 0);
|
||||||
|
|
||||||
String platform_string() const;
|
String platform_string() const;
|
||||||
|
|
|
@ -44,7 +44,7 @@ extern "C" void exit_kernel_thread(void);
|
||||||
// Declare them, to avoid dead code warnings.
|
// 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 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" 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()
|
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?
|
// 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();
|
VERIFY_INTERRUPTS_DISABLED();
|
||||||
#if ARCH(I386)
|
#if ARCH(I386)
|
||||||
|
|
|
@ -65,7 +65,7 @@ String Processor::platform_string() const
|
||||||
return "i386";
|
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(is_kernel_mode());
|
||||||
VERIFY(g_scheduler_lock.is_locked());
|
VERIFY(g_scheduler_lock.is_locked());
|
||||||
|
|
|
@ -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
|
// 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(is_kernel_mode());
|
||||||
VERIFY(g_scheduler_lock.is_locked());
|
VERIFY(g_scheduler_lock.is_locked());
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue