summaryrefslogtreecommitdiff
path: root/rts
diff options
context:
space:
mode:
authorCheng Shao <astrohavoc@gmail.com>2022-10-22 17:51:47 +0000
committerMarge Bot <ben+marge-bot@smart-cactus.org>2022-11-11 00:26:55 -0500
commit50bf5e77891c6a28d1e610ba1da77f877195f1c0 (patch)
tree737271c78f7c1afcbc2a5456d53b2ae60a051ed0 /rts
parent3f1e164f68aedee576e87f7548592a221896d229 (diff)
downloadhaskell-50bf5e77891c6a28d1e610ba1da77f877195f1c0.tar.gz
rts: IPE.c: don't do mutex stuff when THREADED_RTS is not defined
This patch adds the missing THREADED_RTS CPP guard to mutex logic in IPE.c.
Diffstat (limited to 'rts')
-rw-r--r--rts/IPE.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/rts/IPE.c b/rts/IPE.c
index 8e4664d72e..63df8be700 100644
--- a/rts/IPE.c
+++ b/rts/IPE.c
@@ -63,10 +63,20 @@ static HashTable *ipeMap = NULL;
// Accessed atomically
static IpeBufferListNode *ipeBufferList = NULL;
+#if defined(THREADED_RTS)
+
void initIpe(void) { initMutex(&ipeMapLock); }
void exitIpe(void) { closeMutex(&ipeMapLock); }
+#else
+
+void initIpe(void) { }
+
+void exitIpe(void) { }
+
+#endif // THREADED_RTS
+
static InfoProvEnt ipeBufferEntryToIpe(const IpeBufferListNode *node, const IpeBufferEntry *ent)
{
const char *strings = node->string_table;