Kernel: Compactify FileDescrption

The next commit is going to make it bigger again by increasing the size of Lock,
so make use of bitfields to make sure FileDescription still fits into 64 bytes,
and so can still be allocated with the SlabAllocator.
This commit is contained in:
Sergey Bugaev 2020-04-18 12:23:47 +03:00 committed by Andreas Kling
parent 9a109128f8
commit 2f15449531
Notes: sideshowbarker 2024-07-19 07:30:53 +09:00

View file

@ -153,12 +153,12 @@ private:
u32 m_file_flags { 0 };
bool m_readable { false };
bool m_writable { false };
bool m_is_blocking { true };
bool m_is_directory { false };
bool m_should_append { false };
bool m_direct { false };
bool m_readable : 1 { false };
bool m_writable : 1 { false };
bool m_is_blocking : 1 { true };
bool m_is_directory : 1 { false };
bool m_should_append : 1 { false };
bool m_direct : 1 { false };
FIFO::Direction m_fifo_direction { FIFO::Direction::Neither };
Lock m_lock { "FileDescription" };