summaryrefslogtreecommitdiff
path: root/rts/Capability.h
diff options
context:
space:
mode:
authorDuncan Coutts <duncan@well-typed.com>2020-12-28 23:24:44 +0000
committerMarge Bot <ben+marge-bot@smart-cactus.org>2022-11-22 02:06:16 -0500
commit8d6aaa49e011ec58f88b65a50a90f64bfd0a1f60 (patch)
tree41612b1a3ab9ee0f3ae9d77611d08d1807818263 /rts/Capability.h
parent451aeac3b07f171f148995717d0d9a1eefe08f0e (diff)
downloadhaskell-8d6aaa49e011ec58f88b65a50a90f64bfd0a1f60.tar.gz
Introduce CapIOManager as the per-cap I/O mangager state
Rather than each I/O manager adding things into the Capability structure ad-hoc, we should have a common CapIOManager iomgr member of the Capability structure, with a common interface to initialise etc. The content of the CapIOManager struct will be defined differently for each I/O manager implementation. Eventually we should be able to have the CapIOManager be opaque to the rest of the RTS, and known just to the I/O manager implementation. We plan for that by making the Capability contain a pointer to the CapIOManager rather than containing the structure directly. Initially just move the Unix threaded I/O manager's control FD.
Diffstat (limited to 'rts/Capability.h')
-rw-r--r--rts/Capability.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/rts/Capability.h b/rts/Capability.h
index 1f3ff95736..884d281fa2 100644
--- a/rts/Capability.h
+++ b/rts/Capability.h
@@ -24,6 +24,7 @@
#include "Task.h"
#include "Sparks.h"
#include "sm/NonMovingMark.h" // for MarkQueue
+#include "IOManager.h" // for CapIOManager
#include "BeginPrivate.h"
@@ -157,12 +158,11 @@ struct Capability_ {
// Stats on spark creation/conversion
SparkCounters spark_stats;
-#if !defined(mingw32_HOST_OS)
- // IO manager for this cap
- int io_manager_control_wr_fd;
-#endif
#endif
+ // I/O manager data structures for this capability
+ CapIOManager *iomgr;
+
// Per-capability STM-related data
StgTVarWatchQueue *free_tvar_watch_queues;
StgTRecChunk *free_trec_chunks;