summaryrefslogtreecommitdiff
path: root/Kernel
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2020-03-23 13:45:10 +0100
committerAndreas Kling <kling@serenityos.org>2020-03-23 13:48:44 +0100
commit7d862dd5fc3a37093462d5ff187403c9ef680a7a (patch)
tree9d1edc46f76bda21366ea5105605422271560447 /Kernel
parent1dd71bd68f85c3263ec3a2ee4c735e9cc189af6b (diff)
downloadserenity-7d862dd5fc3a37093462d5ff187403c9ef680a7a.zip
AK: Reduce header dependency graph of String.h
String.h no longer pulls in StringView.h. We do this by moving a bunch of String functions out-of-line.
Diffstat (limited to 'Kernel')
-rw-r--r--Kernel/ACPI/ACPIParser.cpp1
-rw-r--r--Kernel/ACPI/ACPIStaticParser.cpp1
-rw-r--r--Kernel/ACPI/DMIDecoder.cpp1
-rw-r--r--Kernel/ACPI/MultiProcessorParser.cpp1
-rw-r--r--Kernel/Devices/KeyboardDevice.cpp1
-rw-r--r--Kernel/Devices/PATAChannel.cpp3
-rw-r--r--Kernel/Devices/PATADiskDevice.cpp1
-rw-r--r--Kernel/Devices/SB16.cpp1
-rw-r--r--Kernel/DoubleBuffer.cpp1
-rw-r--r--Kernel/FileSystem/Custody.cpp1
-rw-r--r--Kernel/FileSystem/DevPtsFS.cpp1
-rw-r--r--Kernel/FileSystem/DiskBackedFileSystem.cpp1
-rw-r--r--Kernel/FileSystem/Ext2FileSystem.cpp1
-rw-r--r--Kernel/FileSystem/FIFO.cpp1
-rw-r--r--Kernel/FileSystem/File.cpp1
-rw-r--r--Kernel/FileSystem/FileSystem.cpp1
-rw-r--r--Kernel/FileSystem/Inode.cpp1
-rw-r--r--Kernel/FileSystem/InodeFile.cpp1
-rw-r--r--Kernel/Interrupts/APIC.cpp1
-rw-r--r--Kernel/Interrupts/IOAPIC.cpp1
-rw-r--r--Kernel/Interrupts/InterruptManagement.cpp1
-rw-r--r--Kernel/KBuffer.h1
-rw-r--r--Kernel/PCI/MMIOAccess.cpp1
-rw-r--r--Kernel/Thread.h2
-rw-r--r--Kernel/Time/HPET.cpp1
-rw-r--r--Kernel/VM/MemoryManager.cpp1
-rw-r--r--Kernel/VM/Region.cpp1
27 files changed, 28 insertions, 2 deletions
diff --git a/Kernel/ACPI/ACPIParser.cpp b/Kernel/ACPI/ACPIParser.cpp
index 03e68b3603..c17a6366b7 100644
--- a/Kernel/ACPI/ACPIParser.cpp
+++ b/Kernel/ACPI/ACPIParser.cpp
@@ -24,6 +24,7 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
+#include <AK/StringView.h>
#include <Kernel/ACPI/ACPIParser.h>
namespace Kernel {
diff --git a/Kernel/ACPI/ACPIStaticParser.cpp b/Kernel/ACPI/ACPIStaticParser.cpp
index 488442582c..f8d1f3a907 100644
--- a/Kernel/ACPI/ACPIStaticParser.cpp
+++ b/Kernel/ACPI/ACPIStaticParser.cpp
@@ -24,6 +24,7 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
+#include <AK/StringView.h>
#include <Kernel/ACPI/ACPIStaticParser.h>
#include <Kernel/PCI/Access.h>
#include <Kernel/VM/MemoryManager.h>
diff --git a/Kernel/ACPI/DMIDecoder.cpp b/Kernel/ACPI/DMIDecoder.cpp
index 6f6f40cdb6..755e46a87b 100644
--- a/Kernel/ACPI/DMIDecoder.cpp
+++ b/Kernel/ACPI/DMIDecoder.cpp
@@ -24,6 +24,7 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
+#include <AK/StringView.h>
#include <Kernel/ACPI/DMIDecoder.h>
#include <Kernel/VM/MemoryManager.h>
#include <LibBareMetal/StdLib.h>
diff --git a/Kernel/ACPI/MultiProcessorParser.cpp b/Kernel/ACPI/MultiProcessorParser.cpp
index 0b405b95b1..05157a77df 100644
--- a/Kernel/ACPI/MultiProcessorParser.cpp
+++ b/Kernel/ACPI/MultiProcessorParser.cpp
@@ -24,6 +24,7 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
+#include <AK/StringView.h>
#include <Kernel/ACPI/MultiProcessorParser.h>
#include <Kernel/VM/MemoryManager.h>
#include <LibBareMetal/StdLib.h>
diff --git a/Kernel/Devices/KeyboardDevice.cpp b/Kernel/Devices/KeyboardDevice.cpp
index 2a5f251305..3ee979bc28 100644
--- a/Kernel/Devices/KeyboardDevice.cpp
+++ b/Kernel/Devices/KeyboardDevice.cpp
@@ -26,6 +26,7 @@
#include <AK/Assertions.h>
#include <AK/ByteBuffer.h>
+#include <AK/StringView.h>
#include <AK/Types.h>
#include <Kernel/Arch/i386/CPU.h>
#include <Kernel/Devices/KeyboardDevice.h>
diff --git a/Kernel/Devices/PATAChannel.cpp b/Kernel/Devices/PATAChannel.cpp
index 7f77d048fa..7d649ddf2b 100644
--- a/Kernel/Devices/PATAChannel.cpp
+++ b/Kernel/Devices/PATAChannel.cpp
@@ -24,9 +24,10 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#include "PATADiskDevice.h"
#include <AK/ByteBuffer.h>
+#include <AK/StringView.h>
#include <Kernel/Devices/PATAChannel.h>
+#include <Kernel/Devices/PATADiskDevice.h>
#include <Kernel/FileSystem/ProcFS.h>
#include <Kernel/Process.h>
#include <Kernel/VM/MemoryManager.h>
diff --git a/Kernel/Devices/PATADiskDevice.cpp b/Kernel/Devices/PATADiskDevice.cpp
index a3aeb13a75..7dcad3678b 100644
--- a/Kernel/Devices/PATADiskDevice.cpp
+++ b/Kernel/Devices/PATADiskDevice.cpp
@@ -27,6 +27,7 @@
//#define PATA_DEVICE_DEBUG
#include <AK/Memory.h>
+#include <AK/StringView.h>
#include <Kernel/Devices/PATAChannel.h>
#include <Kernel/Devices/PATADiskDevice.h>
#include <Kernel/FileSystem/FileDescription.h>
diff --git a/Kernel/Devices/SB16.cpp b/Kernel/Devices/SB16.cpp
index 0c27e24bae..938f37ac2a 100644
--- a/Kernel/Devices/SB16.cpp
+++ b/Kernel/Devices/SB16.cpp
@@ -25,6 +25,7 @@
*/
#include <AK/Memory.h>
+#include <AK/StringView.h>
#include <Kernel/Devices/SB16.h>
#include <Kernel/Thread.h>
#include <Kernel/VM/AnonymousVMObject.h>
diff --git a/Kernel/DoubleBuffer.cpp b/Kernel/DoubleBuffer.cpp
index 0ebac2ae53..f817edb167 100644
--- a/Kernel/DoubleBuffer.cpp
+++ b/Kernel/DoubleBuffer.cpp
@@ -24,6 +24,7 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
+#include <AK/StringView.h>
#include <Kernel/DoubleBuffer.h>
namespace Kernel {
diff --git a/Kernel/FileSystem/Custody.cpp b/Kernel/FileSystem/Custody.cpp
index 71b5d38393..7699c3ea8d 100644
--- a/Kernel/FileSystem/Custody.cpp
+++ b/Kernel/FileSystem/Custody.cpp
@@ -25,6 +25,7 @@
*/
#include <AK/StringBuilder.h>
+#include <AK/StringView.h>
#include <AK/Vector.h>
#include <Kernel/FileSystem/Custody.h>
#include <Kernel/FileSystem/Inode.h>
diff --git a/Kernel/FileSystem/DevPtsFS.cpp b/Kernel/FileSystem/DevPtsFS.cpp
index f2ca0a2351..5bb0266b6b 100644
--- a/Kernel/FileSystem/DevPtsFS.cpp
+++ b/Kernel/FileSystem/DevPtsFS.cpp
@@ -25,6 +25,7 @@
*/
#include <AK/StringBuilder.h>
+#include <AK/StringView.h>
#include <Kernel/FileSystem/DevPtsFS.h>
#include <Kernel/FileSystem/VirtualFileSystem.h>
#include <Kernel/TTY/SlavePTY.h>
diff --git a/Kernel/FileSystem/DiskBackedFileSystem.cpp b/Kernel/FileSystem/DiskBackedFileSystem.cpp
index 98233da3ad..d281f935eb 100644
--- a/Kernel/FileSystem/DiskBackedFileSystem.cpp
+++ b/Kernel/FileSystem/DiskBackedFileSystem.cpp
@@ -24,6 +24,7 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
+#include <AK/StringView.h>
#include <Kernel/Arch/i386/CPU.h>
#include <Kernel/Devices/BlockDevice.h>
#include <Kernel/FileSystem/DiskBackedFileSystem.h>
diff --git a/Kernel/FileSystem/Ext2FileSystem.cpp b/Kernel/FileSystem/Ext2FileSystem.cpp
index cc247457d6..1e4004068d 100644
--- a/Kernel/FileSystem/Ext2FileSystem.cpp
+++ b/Kernel/FileSystem/Ext2FileSystem.cpp
@@ -28,6 +28,7 @@
#include <AK/BufferStream.h>
#include <AK/HashMap.h>
#include <AK/StdLibExtras.h>
+#include <AK/StringView.h>
#include <Kernel/Devices/BlockDevice.h>
#include <Kernel/FileSystem/Ext2FileSystem.h>
#include <Kernel/FileSystem/FileDescription.h>
diff --git a/Kernel/FileSystem/FIFO.cpp b/Kernel/FileSystem/FIFO.cpp
index 586d9e4eb3..9110968e3d 100644
--- a/Kernel/FileSystem/FIFO.cpp
+++ b/Kernel/FileSystem/FIFO.cpp
@@ -26,6 +26,7 @@
#include <AK/HashTable.h>
#include <AK/StdLibExtras.h>
+#include <AK/StringView.h>
#include <Kernel/FileSystem/FIFO.h>
#include <Kernel/FileSystem/FileDescription.h>
#include <Kernel/Lock.h>
diff --git a/Kernel/FileSystem/File.cpp b/Kernel/FileSystem/File.cpp
index 8903220809..85d0de5a71 100644
--- a/Kernel/FileSystem/File.cpp
+++ b/Kernel/FileSystem/File.cpp
@@ -24,6 +24,7 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
+#include <AK/StringView.h>
#include <Kernel/FileSystem/File.h>
#include <Kernel/FileSystem/FileDescription.h>
diff --git a/Kernel/FileSystem/FileSystem.cpp b/Kernel/FileSystem/FileSystem.cpp
index eaa0a3ea49..021da73153 100644
--- a/Kernel/FileSystem/FileSystem.cpp
+++ b/Kernel/FileSystem/FileSystem.cpp
@@ -27,6 +27,7 @@
#include <AK/Assertions.h>
#include <AK/HashMap.h>
#include <AK/StringBuilder.h>
+#include <AK/StringView.h>
#include <Kernel/FileSystem/FileSystem.h>
#include <Kernel/FileSystem/Inode.h>
#include <Kernel/Net/LocalSocket.h>
diff --git a/Kernel/FileSystem/Inode.cpp b/Kernel/FileSystem/Inode.cpp
index a31d4abd22..aa67d33cf4 100644
--- a/Kernel/FileSystem/Inode.cpp
+++ b/Kernel/FileSystem/Inode.cpp
@@ -26,6 +26,7 @@
#include <AK/NonnullRefPtrVector.h>
#include <AK/StringBuilder.h>
+#include <AK/StringView.h>
#include <Kernel/FileSystem/Custody.h>
#include <Kernel/FileSystem/Inode.h>
#include <Kernel/FileSystem/InodeWatcher.h>
diff --git a/Kernel/FileSystem/InodeFile.cpp b/Kernel/FileSystem/InodeFile.cpp
index 399ae4a11a..9b12c18c76 100644
--- a/Kernel/FileSystem/InodeFile.cpp
+++ b/Kernel/FileSystem/InodeFile.cpp
@@ -24,6 +24,7 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
+#include <AK/StringView.h>
#include <Kernel/FileSystem/FileDescription.h>
#include <Kernel/FileSystem/Inode.h>
#include <Kernel/FileSystem/InodeFile.h>
diff --git a/Kernel/Interrupts/APIC.cpp b/Kernel/Interrupts/APIC.cpp
index 6bf3a1aacb..67c25db878 100644
--- a/Kernel/Interrupts/APIC.cpp
+++ b/Kernel/Interrupts/APIC.cpp
@@ -25,6 +25,7 @@
*/
#include <AK/Assertions.h>
+#include <AK/StringView.h>
#include <AK/Types.h>
#include <Kernel/Arch/i386/CPU.h>
#include <Kernel/Interrupts/APIC.h>
diff --git a/Kernel/Interrupts/IOAPIC.cpp b/Kernel/Interrupts/IOAPIC.cpp
index c1cb1d495b..0bf77069e7 100644
--- a/Kernel/Interrupts/IOAPIC.cpp
+++ b/Kernel/Interrupts/IOAPIC.cpp
@@ -24,6 +24,7 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
+#include <AK/StringView.h>
#include <Kernel/ACPI/MultiProcessorParser.h>
#include <Kernel/Arch/i386/CPU.h>
#include <Kernel/Interrupts/APIC.h>
diff --git a/Kernel/Interrupts/InterruptManagement.cpp b/Kernel/Interrupts/InterruptManagement.cpp
index 7ae979e034..154a1a9ce4 100644
--- a/Kernel/Interrupts/InterruptManagement.cpp
+++ b/Kernel/Interrupts/InterruptManagement.cpp
@@ -25,6 +25,7 @@
*/
#include <AK/FixedArray.h>
+#include <AK/StringView.h>
#include <Kernel/ACPI/MultiProcessorParser.h>
#include <Kernel/Arch/i386/CPU.h>
#include <Kernel/Interrupts/APIC.h>
diff --git a/Kernel/KBuffer.h b/Kernel/KBuffer.h
index f5cd6aedf2..6e03518607 100644
--- a/Kernel/KBuffer.h
+++ b/Kernel/KBuffer.h
@@ -40,6 +40,7 @@
#include <AK/ByteBuffer.h>
#include <AK/LogStream.h>
#include <AK/Memory.h>
+#include <AK/StringView.h>
#include <Kernel/VM/MemoryManager.h>
#include <Kernel/VM/Region.h>
diff --git a/Kernel/PCI/MMIOAccess.cpp b/Kernel/PCI/MMIOAccess.cpp
index 7606c9b6f0..ae3b3ca751 100644
--- a/Kernel/PCI/MMIOAccess.cpp
+++ b/Kernel/PCI/MMIOAccess.cpp
@@ -25,6 +25,7 @@
*/
#include <AK/Optional.h>
+#include <AK/StringView.h>
#include <Kernel/PCI/MMIOAccess.h>
#include <Kernel/VM/MemoryManager.h>
diff --git a/Kernel/Thread.h b/Kernel/Thread.h
index 1d0e9e0e50..aeebdc462f 100644
--- a/Kernel/Thread.h
+++ b/Kernel/Thread.h
@@ -100,7 +100,7 @@ public:
Vector<FlatPtr> raw_backtrace(FlatPtr ebp) const;
const String& name() const { return m_name; }
- void set_name(StringView s) { m_name = s; }
+ void set_name(const StringView& s) { m_name = s; }
void finalize();
diff --git a/Kernel/Time/HPET.cpp b/Kernel/Time/HPET.cpp
index ffac283411..e7d082780c 100644
--- a/Kernel/Time/HPET.cpp
+++ b/Kernel/Time/HPET.cpp
@@ -24,6 +24,7 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
+#include <AK/StringView.h>
#include <Kernel/ACPI/ACPIParser.h>
#include <Kernel/Interrupts/InterruptManagement.h>
#include <Kernel/Time/HPET.h>
diff --git a/Kernel/VM/MemoryManager.cpp b/Kernel/VM/MemoryManager.cpp
index b03f1fe1bc..4ee2a19e58 100644
--- a/Kernel/VM/MemoryManager.cpp
+++ b/Kernel/VM/MemoryManager.cpp
@@ -28,6 +28,7 @@
#include "Process.h"
#include <AK/Assertions.h>
#include <AK/Memory.h>
+#include <AK/StringView.h>
#include <Kernel/Arch/i386/CPU.h>
#include <Kernel/FileSystem/Inode.h>
#include <Kernel/Multiboot.h>
diff --git a/Kernel/VM/Region.cpp b/Kernel/VM/Region.cpp
index 6caf5a24da..2320ef6ea0 100644
--- a/Kernel/VM/Region.cpp
+++ b/Kernel/VM/Region.cpp
@@ -25,6 +25,7 @@
*/
#include <AK/Memory.h>
+#include <AK/StringView.h>
#include <Kernel/FileSystem/Inode.h>
#include <Kernel/Process.h>
#include <Kernel/Thread.h>