Commit 179a3a7b authored by Ian Lynagh's avatar Ian Lynagh
Browse files

When raising NonTermination with the RTS, build the right value

We now use a nonTermination value in the base library to take take of
constructing the SomeException value, with the dictionaries etc, for us.
We'll probably need to do the same for some other exceptions too
parent 1c7a841f
......@@ -128,7 +128,7 @@ HC_BOOT_LD_OPTS += \
-u "$(UNDERSCORE)base_GHCziPack_unpackCString_closure" \
-u "$(UNDERSCORE)base_GHCziIOBase_stackOverflow_closure" \
-u "$(UNDERSCORE)base_GHCziIOBase_heapOverflow_closure" \
-u "$(UNDERSCORE)base_GHCziIOBase_NonTermination_closure" \
-u "$(UNDERSCORE)base_GHCziIOBase_nonTermination_closure" \
-u "$(UNDERSCORE)base_GHCziIOBase_BlockedOnDeadMVar_closure" \
-u "$(UNDERSCORE)base_GHCziIOBase_Deadlock_closure" \
-u "$(UNDERSCORE)base_GHCziWeak_runFinalizzerBatch_closure" \
......
......@@ -23,6 +23,6 @@ PrelPack_unpackCString_closure
PrelIOBase_stackOverflow_closure
PrelIOBase_BlockedOnDeadMVar_closure
PrelIOBase_BlockedIndefinitely_closure
PrelIOBase_NonTermination_closure
PrelIOBase_nonTermination_closure
PrelWeak_runFinalizzerBatch_closure
__stginit_Prelude
......@@ -39,7 +39,7 @@ PRELUDE_CLOSURE(base_GHCziIOBase_stackOverflow_closure);
PRELUDE_CLOSURE(base_GHCziIOBase_heapOverflow_closure);
PRELUDE_CLOSURE(base_GHCziIOBase_BlockedOnDeadMVar_closure);
PRELUDE_CLOSURE(base_GHCziIOBase_BlockedIndefinitely_closure);
PRELUDE_CLOSURE(base_GHCziIOBase_NonTermination_closure);
PRELUDE_CLOSURE(base_GHCziIOBase_nonTermination_closure);
PRELUDE_CLOSURE(base_GHCziIOBase_NestedAtomically_closure);
PRELUDE_CLOSURE(base_GHCziConc_ensureIOManagerIsRunning_closure);
......@@ -89,7 +89,7 @@ PRELUDE_INFO(base_GHCziStable_StablePtr_con_info);
#define heapOverflow_closure DLL_IMPORT_DATA_REF(base_GHCziIOBase_heapOverflow_closure)
#define BlockedOnDeadMVar_closure DLL_IMPORT_DATA_REF(base_GHCziIOBase_BlockedOnDeadMVar_closure)
#define BlockedIndefinitely_closure DLL_IMPORT_DATA_REF(base_GHCziIOBase_BlockedIndefinitely_closure)
#define NonTermination_closure DLL_IMPORT_DATA_REF(base_GHCziIOBase_NonTermination_closure)
#define nonTermination_closure DLL_IMPORT_DATA_REF(base_GHCziIOBase_nonTermination_closure)
#define NestedAtomically_closure DLL_IMPORT_DATA_REF(base_GHCziIOBase_NestedAtomically_closure)
#define Czh_static_info DLL_IMPORT_DATA_REF(base_GHCziBase_Czh_static_info)
......
......@@ -1021,7 +1021,7 @@ scheduleDetectDeadlock (Capability *cap, Task *task)
case BlockedOnException:
case BlockedOnMVar:
throwToSingleThreaded(cap, task->tso,
(StgClosure *)NonTermination_closure);
(StgClosure *)nonTermination_closure);
return;
default:
barf("deadlock: main thread blocked in a strange way");
......@@ -3156,7 +3156,7 @@ resurrectThreads (StgTSO *threads)
break;
case BlockedOnBlackHole:
throwToSingleThreaded(cap, tso,
(StgClosure *)NonTermination_closure);
(StgClosure *)nonTermination_closure);
break;
case BlockedOnSTM:
throwToSingleThreaded(cap, tso,
......
......@@ -105,7 +105,7 @@ ld-options:
, "-u", "_base_GHCziPack_unpackCString_closure"
, "-u", "_base_GHCziIOBase_stackOverflow_closure"
, "-u", "_base_GHCziIOBase_heapOverflow_closure"
, "-u", "_base_GHCziIOBase_NonTermination_closure"
, "-u", "_base_GHCziIOBase_nonTermination_closure"
, "-u", "_base_GHCziIOBase_BlockedOnDeadMVar_closure"
, "-u", "_base_GHCziIOBase_BlockedIndefinitely_closure"
, "-u", "_base_GHCziIOBase_Deadlock_closure"
......@@ -139,7 +139,7 @@ ld-options:
, "-u", "base_GHCziPack_unpackCString_closure"
, "-u", "base_GHCziIOBase_stackOverflow_closure"
, "-u", "base_GHCziIOBase_heapOverflow_closure"
, "-u", "base_GHCziIOBase_NonTermination_closure"
, "-u", "base_GHCziIOBase_nonTermination_closure"
, "-u", "base_GHCziIOBase_BlockedOnDeadMVar_closure"
, "-u", "base_GHCziIOBase_BlockedIndefinitely_closure"
, "-u", "base_GHCziIOBase_Deadlock_closure"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment