summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Gamari <ben@smart-cactus.org>2022-04-05 23:26:39 -0400
committerMarge Bot <ben+marge-bot@smart-cactus.org>2022-04-08 03:01:53 -0400
commit56f85d62cf3d3effe1d64624898b779d764730fb (patch)
treeac2cde0c5009ec3f622483b36edd66070fddffe0
parentc32c4db60307b1f64369d2c63ccee331c9f33f11 (diff)
downloadhaskell-56f85d62cf3d3effe1d64624898b779d764730fb.tar.gz
rts: Fix various #include issues
This fixes various violations of the newly-added RTS includes linter.
-rw-r--r--rts/CheckUnload.h4
-rw-r--r--rts/HsFFI.c2
-rw-r--r--rts/LibdwPool.h4
-rw-r--r--rts/LinkerInternals.h4
-rw-r--r--rts/Messages.h8
-rw-r--r--rts/PathUtils.h4
-rw-r--r--rts/Profiling.h4
-rw-r--r--rts/RtsFlags.h3
-rw-r--r--rts/RtsSymbolInfo.c3
-rw-r--r--rts/RtsSymbols.c3
-rw-r--r--rts/StaticPtrTable.c2
-rw-r--r--rts/linker/Elf.h3
-rw-r--r--rts/linker/MachO.h3
-rw-r--r--rts/sm/GC.h4
-rw-r--r--rts/sm/GCUtils.h4
-rw-r--r--rts/sm/MarkStack.h3
16 files changed, 28 insertions, 30 deletions
diff --git a/rts/CheckUnload.h b/rts/CheckUnload.h
index de07aef1c3..5471544433 100644
--- a/rts/CheckUnload.h
+++ b/rts/CheckUnload.h
@@ -10,10 +10,10 @@
#pragma once
-#include "BeginPrivate.h"
-
#include "LinkerInternals.h"
+#include "BeginPrivate.h"
+
// Currently live objects
extern ObjectCode *objects;
diff --git a/rts/HsFFI.c b/rts/HsFFI.c
index 58651b81e9..0b9f3f0063 100644
--- a/rts/HsFFI.c
+++ b/rts/HsFFI.c
@@ -7,8 +7,8 @@
* ---------------------------------------------------------------------------*/
#include "rts/PosixSource.h"
-#include "HsFFI.h"
#include "Rts.h"
+#include "HsFFI.h"
#include "StablePtr.h"
#include "Task.h"
diff --git a/rts/LibdwPool.h b/rts/LibdwPool.h
index b1c333eebc..563934c7a9 100644
--- a/rts/LibdwPool.h
+++ b/rts/LibdwPool.h
@@ -8,11 +8,11 @@
#pragma once
-#include "BeginPrivate.h"
-
#include "Rts.h"
#include "Libdw.h"
+#include "BeginPrivate.h"
+
#if USE_LIBDW
/* Initialize the pool */
diff --git a/rts/LinkerInternals.h b/rts/LinkerInternals.h
index eb76a979bc..e5d3bfacac 100644
--- a/rts/LinkerInternals.h
+++ b/rts/LinkerInternals.h
@@ -18,8 +18,6 @@
void printLoadedObjects(void);
-#include "BeginPrivate.h"
-
/* Which object file format are we targeting? */
#if defined(linux_HOST_OS) || defined(solaris2_HOST_OS) \
|| defined(linux_android_HOST_OS) \
@@ -368,6 +366,8 @@ typedef struct _RtsSymbolInfo {
SymStrength strength;
} RtsSymbolInfo;
+#include "BeginPrivate.h"
+
void exitLinker( void );
void freeObjectCode (ObjectCode *oc);
diff --git a/rts/Messages.h b/rts/Messages.h
index 8cefcafd97..ecae7e6365 100644
--- a/rts/Messages.h
+++ b/rts/Messages.h
@@ -8,6 +8,10 @@
#pragma once
+#include "Capability.h"
+#include "Updates.h" // for DEBUG_FILL_SLOP
+#include "SMPClosureOps.h"
+
#include "BeginPrivate.h"
uint32_t messageBlackHole(Capability *cap, MessageBlackHole *msg);
@@ -18,10 +22,6 @@ void executeMessage (Capability *cap, Message *m);
void sendMessage (Capability *from_cap, Capability *to_cap, Message *msg);
#endif
-#include "Capability.h"
-#include "Updates.h" // for DEBUG_FILL_SLOP
-#include "SMPClosureOps.h"
-
INLINE_HEADER void
doneWithMsgThrowTo (Capability *cap, MessageThrowTo *m)
{
diff --git a/rts/PathUtils.h b/rts/PathUtils.h
index 8a42e34b54..a2dc10e912 100644
--- a/rts/PathUtils.h
+++ b/rts/PathUtils.h
@@ -8,8 +8,6 @@
#pragma once
-#include "BeginPrivate.h"
-
// Use wchar_t for pathnames on Windows (#5697)
#if defined(mingw32_HOST_OS)
#include "fs_rts.h"
@@ -37,6 +35,8 @@
#define pathcopy strcpy
#endif
+#include "BeginPrivate.h"
+
pathchar* pathdup(pathchar *path);
pathchar* pathdir(pathchar *path);
pathchar* mkPath(char* path);
diff --git a/rts/Profiling.h b/rts/Profiling.h
index abb731217a..b3724c3c88 100644
--- a/rts/Profiling.h
+++ b/rts/Profiling.h
@@ -10,13 +10,13 @@
#include <stdio.h>
-#include "BeginPrivate.h"
#include "Rts.h"
-
#if defined(DEBUG)
#include "Arena.h"
#endif
+#include "BeginPrivate.h"
+
#if defined(PROFILING)
#define PROFILING_ONLY(s) s
#else
diff --git a/rts/RtsFlags.h b/rts/RtsFlags.h
index bfcc43af42..6c81081d4d 100644
--- a/rts/RtsFlags.h
+++ b/rts/RtsFlags.h
@@ -9,9 +9,10 @@
#pragma once
-#include "BeginPrivate.h"
#include <stdbool.h>
+#include "BeginPrivate.h"
+
/* Routines that operate-on/to-do-with RTS flags: */
#if defined(mingw32_HOST_OS)
diff --git a/rts/RtsSymbolInfo.c b/rts/RtsSymbolInfo.c
index 1110d582d6..f1f65bd6b6 100644
--- a/rts/RtsSymbolInfo.c
+++ b/rts/RtsSymbolInfo.c
@@ -7,9 +7,8 @@
* ---------------------------------------------------------------------------*/
#include "ghcplatform.h"
-#include "RtsSymbolInfo.h"
-
#include "Rts.h"
+#include "RtsSymbolInfo.h"
#include "HsFFI.h"
#include "Hash.h"
diff --git a/rts/RtsSymbols.c b/rts/RtsSymbols.c
index 5f97568b62..07ff1cc721 100644
--- a/rts/RtsSymbols.c
+++ b/rts/RtsSymbols.c
@@ -7,9 +7,8 @@
* ---------------------------------------------------------------------------*/
#include "ghcplatform.h"
-#include "RtsSymbols.h"
-
#include "Rts.h"
+#include "RtsSymbols.h"
#include "TopHandler.h"
#include "HsFFI.h"
#include "CloneStack.h"
diff --git a/rts/StaticPtrTable.c b/rts/StaticPtrTable.c
index 9754cfad41..282d9b7899 100644
--- a/rts/StaticPtrTable.c
+++ b/rts/StaticPtrTable.c
@@ -8,8 +8,8 @@
*
*/
-#include "StaticPtrTable.h"
#include "Rts.h"
+#include "StaticPtrTable.h"
#include "RtsUtils.h"
#include "Hash.h"
#include "StablePtr.h"
diff --git a/rts/linker/Elf.h b/rts/linker/Elf.h
index a16255abba..12bf1772f7 100644
--- a/rts/linker/Elf.h
+++ b/rts/linker/Elf.h
@@ -2,11 +2,10 @@
#include "Rts.h"
#include "LinkerInternals.h"
+#include "linker/ElfTypes.h"
#include "BeginPrivate.h"
-#include <linker/ElfTypes.h>
-
void ocInit_ELF ( ObjectCode* oc );
void ocDeinit_ELF ( ObjectCode* oc );
int ocVerifyImage_ELF ( ObjectCode* oc );
diff --git a/rts/linker/MachO.h b/rts/linker/MachO.h
index 518c2ce569..f55f68ddc8 100644
--- a/rts/linker/MachO.h
+++ b/rts/linker/MachO.h
@@ -1,11 +1,10 @@
#pragma once
#include "Rts.h"
+#include "MachOTypes.h"
#include "BeginPrivate.h"
-#include "MachOTypes.h"
-
void ocInit_MachO ( ObjectCode* oc );
void ocDeinit_MachO ( ObjectCode* oc );
int ocVerifyImage_MachO ( ObjectCode* oc );
diff --git a/rts/sm/GC.h b/rts/sm/GC.h
index da90c61302..25de588534 100644
--- a/rts/sm/GC.h
+++ b/rts/sm/GC.h
@@ -13,10 +13,10 @@
#pragma once
-#include "BeginPrivate.h"
-
#include "HeapAlloc.h"
+#include "BeginPrivate.h"
+
void GarbageCollect (uint32_t collect_gen,
bool do_heap_census,
bool is_overflow_gc,
diff --git a/rts/sm/GCUtils.h b/rts/sm/GCUtils.h
index 798a795deb..dec81e1755 100644
--- a/rts/sm/GCUtils.h
+++ b/rts/sm/GCUtils.h
@@ -13,10 +13,10 @@
#pragma once
-#include "BeginPrivate.h"
-
#include "GCTDecl.h"
+#include "BeginPrivate.h"
+
bdescr* allocGroup_sync(uint32_t n);
bdescr* allocGroupOnNode_sync(uint32_t node, uint32_t n);
diff --git a/rts/sm/MarkStack.h b/rts/sm/MarkStack.h
index ca519f871f..8ea47a1865 100644
--- a/rts/sm/MarkStack.h
+++ b/rts/sm/MarkStack.h
@@ -13,9 +13,10 @@
#pragma once
-#include "BeginPrivate.h"
#include "GCUtils.h"
+#include "BeginPrivate.h"
+
INLINE_HEADER void
push_mark_stack(StgPtr p)
{