1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 14:57:35 +00:00

Kernel: Reorder some Process members to shrink the class by 8 bytes

This commit is contained in:
Andreas Kling 2019-08-08 14:56:50 +02:00
parent 6d32b8fc36
commit 533b5c0adc

View file

@ -44,7 +44,7 @@ public:
static Vector<pid_t> all_pids(); static Vector<pid_t> all_pids();
static Vector<Process*> all_processes(); static Vector<Process*> all_processes();
enum Priority { enum Priority : u8 {
IdlePriority, IdlePriority,
FirstPriority = IdlePriority, FirstPriority = IdlePriority,
LowPriority, LowPriority,
@ -53,7 +53,7 @@ public:
LastPriority = HighPriority, LastPriority = HighPriority,
}; };
enum RingLevel { enum RingLevel : u8 {
Ring0 = 0, Ring0 = 0,
Ring3 = 3, Ring3 = 3,
}; };
@ -320,7 +320,7 @@ private:
pid_t m_sid { 0 }; pid_t m_sid { 0 };
pid_t m_pgid { 0 }; pid_t m_pgid { 0 };
Priority m_priority { NormalPriority }; static const int m_max_open_file_descriptors { FD_SETSIZE };
struct FileDescriptionAndFlags { struct FileDescriptionAndFlags {
operator bool() const { return !!description; } operator bool() const { return !!description; }
@ -330,13 +330,15 @@ private:
u32 flags { 0 }; u32 flags { 0 };
}; };
Vector<FileDescriptionAndFlags> m_fds; Vector<FileDescriptionAndFlags> m_fds;
RingLevel m_ring { Ring0 }; RingLevel m_ring { Ring0 };
Priority m_priority { NormalPriority };
static const int m_max_open_file_descriptors { FD_SETSIZE };
u8 m_termination_status { 0 }; u8 m_termination_status { 0 };
u8 m_termination_signal { 0 }; u8 m_termination_signal { 0 };
bool m_being_inspected { false };
bool m_dead { false };
RefPtr<Custody> m_executable; RefPtr<Custody> m_executable;
RefPtr<Custody> m_cwd; RefPtr<Custody> m_cwd;
@ -353,9 +355,6 @@ private:
HashTable<gid_t> m_gids; HashTable<gid_t> m_gids;
bool m_being_inspected { false };
bool m_dead { false };
int m_next_tid { 0 }; int m_next_tid { 0 };
unsigned m_syscall_count { 0 }; unsigned m_syscall_count { 0 };