summaryrefslogtreecommitdiff
path: root/rts/Prelude.h
diff options
context:
space:
mode:
authorSergei Trofimovich <slyfox@gentoo.org>2014-05-23 23:58:06 +0300
committerSimon Marlow <marlowsd@gmail.com>2014-06-08 11:21:11 +0100
commit9fd507e5758f4141ac2619f0db57136bcab035c6 (patch)
tree2eb2d698e7d0b634804dd1753400395f352eb00e /rts/Prelude.h
parent2f8b4c9330b455d4cb31c186c747a7db12a69251 (diff)
downloadhaskell-9fd507e5758f4141ac2619f0db57136bcab035c6.tar.gz
Raise exceptions when blocked in bad FDs (fixes Trac #4934)
Before the patch any call to 'select()' with 'bad_fd' led to: - unblocking of all threads - hiding exception for 'threadWaitRead bad_fd' The patch fixes both cases in this way: after 'select()' failure we iterate over each blocked descriptor and poll individually to see it's actual status, which is: - READY (move to run queue) - BLOCKED (leave in blocked queue) - INVALID (send an IOErrror exception) Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
Diffstat (limited to 'rts/Prelude.h')
-rw-r--r--rts/Prelude.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/rts/Prelude.h b/rts/Prelude.h
index 89e80a0a3d..0c54148ba2 100644
--- a/rts/Prelude.h
+++ b/rts/Prelude.h
@@ -42,6 +42,7 @@ PRELUDE_CLOSURE(base_GHCziIOziException_blockedIndefinitelyOnMVar_closure);
PRELUDE_CLOSURE(base_GHCziIOziException_blockedIndefinitelyOnSTM_closure);
PRELUDE_CLOSURE(base_ControlziExceptionziBase_nonTermination_closure);
PRELUDE_CLOSURE(base_ControlziExceptionziBase_nestedAtomically_closure);
+PRELUDE_CLOSURE(base_GHCziEventziThread_blockedOnBadFD_closure);
PRELUDE_CLOSURE(base_GHCziConcziSync_runSparks_closure);
PRELUDE_CLOSURE(base_GHCziConcziIO_ensureIOManagerIsRunning_closure);
@@ -104,6 +105,7 @@ PRELUDE_INFO(base_GHCziStable_StablePtr_con_info);
#define blockedIndefinitelyOnSTM_closure DLL_IMPORT_DATA_REF(base_GHCziIOziException_blockedIndefinitelyOnSTM_closure)
#define nonTermination_closure DLL_IMPORT_DATA_REF(base_ControlziExceptionziBase_nonTermination_closure)
#define nestedAtomically_closure DLL_IMPORT_DATA_REF(base_ControlziExceptionziBase_nestedAtomically_closure)
+#define blockedOnBadFD_closure DLL_IMPORT_DATA_REF(base_GHCziEventziThread_blockedOnBadFD_closure)
#define Czh_static_info DLL_IMPORT_DATA_REF(ghczmprim_GHCziTypes_Czh_static_info)
#define Fzh_static_info DLL_IMPORT_DATA_REF(ghczmprim_GHCziTypes_Fzh_static_info)