diff options
author | Sergey Bugaev <bugaevc@serenityos.org> | 2020-04-18 12:23:47 +0300 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-04-18 13:58:29 +0200 |
commit | 2f154495318d626f62fd1c3c2ee2d083c5d44b2b (patch) | |
tree | a903050788043547377dd79c551a38c36ff99cc3 /Kernel | |
parent | 9a109128f84a3e10008844be676f0076f126e9df (diff) | |
download | serenity-2f154495318d626f62fd1c3c2ee2d083c5d44b2b.zip |
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.
Diffstat (limited to 'Kernel')
-rw-r--r-- | Kernel/FileSystem/FileDescription.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/Kernel/FileSystem/FileDescription.h b/Kernel/FileSystem/FileDescription.h index 648e6f9366..fc240934cc 100644 --- a/Kernel/FileSystem/FileDescription.h +++ b/Kernel/FileSystem/FileDescription.h @@ -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" }; |