mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 19:07:35 +00:00
Kernel: Mark read only RegisterState function parameters as const
This commit is contained in:
parent
27e1120dff
commit
85e95105c6
4 changed files with 4 additions and 4 deletions
|
@ -33,7 +33,7 @@ inline u32 get_iopl_from_eflags(u32 eflags)
|
||||||
const DescriptorTablePointer& get_gdtr();
|
const DescriptorTablePointer& get_gdtr();
|
||||||
const DescriptorTablePointer& get_idtr();
|
const DescriptorTablePointer& get_idtr();
|
||||||
|
|
||||||
[[noreturn]] void handle_crash(RegisterState&, const char* description, int signal, bool out_of_memory = false);
|
[[noreturn]] void handle_crash(RegisterState const&, char const* description, int signal, bool out_of_memory = false);
|
||||||
|
|
||||||
#define LSW(x) ((u32)(x)&0xFFFF)
|
#define LSW(x) ((u32)(x)&0xFFFF)
|
||||||
#define MSW(x) (((u32)(x) >> 16) & 0xFFFF)
|
#define MSW(x) (((u32)(x) >> 16) & 0xFFFF)
|
||||||
|
|
|
@ -210,7 +210,7 @@ static void dump(const RegisterState& regs)
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void handle_crash(RegisterState& regs, const char* description, int signal, bool out_of_memory)
|
void handle_crash(RegisterState const& regs, char const* description, int signal, bool out_of_memory)
|
||||||
{
|
{
|
||||||
auto process = Process::current();
|
auto process = Process::current();
|
||||||
if (!process) {
|
if (!process) {
|
||||||
|
|
|
@ -636,7 +636,7 @@ Region* MemoryManager::find_user_region_from_vaddr(Space& space, VirtualAddress
|
||||||
return find_user_region_from_vaddr_no_lock(space, vaddr);
|
return find_user_region_from_vaddr_no_lock(space, vaddr);
|
||||||
}
|
}
|
||||||
|
|
||||||
void MemoryManager::validate_syscall_preconditions(Space& space, RegisterState& regs)
|
void MemoryManager::validate_syscall_preconditions(Space& space, RegisterState const& regs)
|
||||||
{
|
{
|
||||||
// We take the space lock once here and then use the no_lock variants
|
// We take the space lock once here and then use the no_lock variants
|
||||||
// to avoid excessive spinlock recursion in this extemely common path.
|
// to avoid excessive spinlock recursion in this extemely common path.
|
||||||
|
|
|
@ -190,7 +190,7 @@ public:
|
||||||
|
|
||||||
static Region* find_user_region_from_vaddr(Space&, VirtualAddress);
|
static Region* find_user_region_from_vaddr(Space&, VirtualAddress);
|
||||||
static Region* find_user_region_from_vaddr_no_lock(Space&, VirtualAddress);
|
static Region* find_user_region_from_vaddr_no_lock(Space&, VirtualAddress);
|
||||||
static void validate_syscall_preconditions(Space&, RegisterState&);
|
static void validate_syscall_preconditions(Space&, RegisterState const&);
|
||||||
|
|
||||||
void dump_kernel_regions();
|
void dump_kernel_regions();
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue