diff options
author | Duncan Coutts <duncan@well-typed.com> | 2020-12-29 00:11:07 +0000 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2021-01-25 05:11:14 -0500 |
commit | 455ad48bdfb5d47d666d23db81ad10c855dab078 (patch) | |
tree | 633fab12c0542b84e383ebe96cafa51c7a820a71 /rts | |
parent | 54946e4f4bed9b8146db9235794d1698c9b7ad50 (diff) | |
download | haskell-455ad48bdfb5d47d666d23db81ad10c855dab078.tar.gz |
Move setIOManagerControlFd from Capability.c to IOManager.c
This is a better home for it. It is not really an aspect of
capabilities. It is specific to one of the I/O manager impls.
Diffstat (limited to 'rts')
-rw-r--r-- | rts/Capability.c | 17 | ||||
-rw-r--r-- | rts/IOManager.c | 17 |
2 files changed, 17 insertions, 17 deletions
diff --git a/rts/Capability.c b/rts/Capability.c index 63c01ac348..a77112650a 100644 --- a/rts/Capability.c +++ b/rts/Capability.c @@ -30,10 +30,6 @@ #include "sm/OSMem.h" #include "sm/BlockAlloc.h" // for countBlocks() -#if !defined(mingw32_HOST_OS) -#include "rts/IOInterface.h" // for setIOManagerControlFd() -#endif - #include <string.h> // one global capability, this is the Capability for non-threaded @@ -1363,16 +1359,3 @@ bool checkSparkCountInvariant (void) } #endif - -#if !defined(mingw32_HOST_OS) -void -setIOManagerControlFd(uint32_t cap_no USED_IF_THREADS, int fd USED_IF_THREADS) { -#if defined(THREADED_RTS) - if (cap_no < n_capabilities) { - RELAXED_STORE(&capabilities[cap_no]->io_manager_control_wr_fd, fd); - } else { - errorBelch("warning: setIOManagerControlFd called with illegal capability number."); - } -#endif -} -#endif diff --git a/rts/IOManager.c b/rts/IOManager.c index 533edbf45e..03811f1daa 100644 --- a/rts/IOManager.c +++ b/rts/IOManager.c @@ -18,4 +18,21 @@ #include "Rts.h" #include "rts/IOInterface.h" // exported #include "IOManager.h" // RTS internal +#include "Capability.h" + +/* Declared in rts/IOInterface.h. Used only by the MIO threaded I/O manager on + * Unix platforms. + */ +#if !defined(mingw32_HOST_OS) +void +setIOManagerControlFd(uint32_t cap_no USED_IF_THREADS, int fd USED_IF_THREADS) { +#if defined(THREADED_RTS) + if (cap_no < n_capabilities) { + RELAXED_STORE(&capabilities[cap_no]->io_manager_control_wr_fd, fd); + } else { + errorBelch("warning: setIOManagerControlFd called with illegal capability number."); + } +#endif +} +#endif |