summaryrefslogtreecommitdiff
path: root/rts/posix
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/posix
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/posix')
-rw-r--r--rts/posix/Signals.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/rts/posix/Signals.c b/rts/posix/Signals.c
index 95a7853e37..7d58f3d7a2 100644
--- a/rts/posix/Signals.c
+++ b/rts/posix/Signals.c
@@ -203,11 +203,11 @@ ioManagerDie (void)
{
// Shut down IO managers
for (i=0; i < n_capabilities; i++) {
- const int fd = RELAXED_LOAD(&capabilities[i]->io_manager_control_wr_fd);
+ const int fd = RELAXED_LOAD(&capabilities[i]->iomgr->control_fd);
if (0 <= fd) {
r = write(fd, &byte, 1);
if (r == -1) { sysErrorBelch("ioManagerDie: write"); }
- RELAXED_STORE(&capabilities[i]->io_manager_control_wr_fd, -1);
+ RELAXED_STORE(&capabilities[i]->iomgr->control_fd, -1);
}
}
}