Skip to content
Snippets Groups Projects
Commit 877a2a80 authored by Duncan Coutts's avatar Duncan Coutts Committed by Marge Bot
Browse files

The select() I/O manager does have some global initialisation

It's just to make sure an exception CAF is a GC root.
parent aaa294d0
No related branches found
No related tags found
No related merge requests found
......@@ -20,6 +20,7 @@
#include "IOManager.h" // RTS internal
#include "Capability.h"
#include "Schedule.h"
#include "Prelude.h"
#include "RtsFlags.h"
#include "RtsUtils.h"
#include "sm/Evac.h"
......@@ -296,8 +297,15 @@ void initIOManager(void)
switch (iomgr_type) {
/* The IO_MANAGER_SELECT needs no global initialisation */
#if defined(IOMGR_ENABLED_SELECT)
case IO_MANAGER_SELECT:
/* Make the exception CAF a GC root. See initBuiltinGcRoots for
* similar examples. We throw this exception if a thread tries to
* wait on an invalid FD.
*/
getStablePtr((StgPtr)blockedOnBadFD_closure);
break;
#endif
#if defined(IOMGR_ENABLED_MIO_POSIX)
case IO_MANAGER_MIO_POSIX:
/* Posix implementation in posix/Signals.c
......
......@@ -211,7 +211,6 @@ static void initBuiltinGcRoots(void)
getStablePtr((StgPtr)interruptIOManager_closure);
getStablePtr((StgPtr)ioManagerCapabilitiesChanged_closure);
#if !defined(mingw32_HOST_OS)
getStablePtr((StgPtr)blockedOnBadFD_closure);
getStablePtr((StgPtr)runHandlersPtr_closure);
#else
getStablePtr((StgPtr)processRemoteCompletion_closure);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment