diff --git a/kernel/src/arch/x86_64/Thread.cpp b/kernel/src/arch/x86_64/Thread.cpp index 09a5793f..a7cac28d 100644 --- a/kernel/src/arch/x86_64/Thread.cpp +++ b/kernel/src/arch/x86_64/Thread.cpp @@ -15,7 +15,7 @@ void Thread::set_ip(u64 ip) regs.rip = ip; } -u64 Thread::ip() +u64 Thread::ip() const { return regs.rip; } @@ -25,7 +25,7 @@ void Thread::set_sp(u64 sp) regs.rsp = sp; } -u64 Thread::sp() +u64 Thread::sp() const { return regs.rsp; } diff --git a/kernel/src/thread/Thread.h b/kernel/src/thread/Thread.h index 082734e3..cfd12b66 100644 --- a/kernel/src/thread/Thread.h +++ b/kernel/src/thread/Thread.h @@ -198,10 +198,10 @@ struct Thread : public LinkedListNode void set_arguments(u64 arg1, u64 arg2, u64 arg3, u64 arg4); void set_ip(u64 ip); - u64 ip(); + u64 ip() const; void set_sp(u64 sp); - u64 sp(); + u64 sp() const; void set_return(u64 ret); u64 return_register();