summaryrefslogtreecommitdiff
path: root/includes
diff options
context:
space:
mode:
authorBen Gamari <bgamari.foss@gmail.com>2018-06-02 11:48:39 -0400
committerBen Gamari <ben@smart-cactus.org>2018-06-02 19:04:52 -0400
commita122d4fdd0a5858e44f9d3be90a258903e0288b2 (patch)
tree731c1a7954d5347d2b6195527cfdf344a083d9bc /includes
parent9ea45963ad2ef2051ca3689562607eb4916d65e8 (diff)
downloadhaskell-a122d4fdd0a5858e44f9d3be90a258903e0288b2.tar.gz
rts: Rip out support for STM invariants
This feature has some very serious correctness issues (#14310), introduces a great deal of complexity, and hasn't seen wide usage. Consequently we are removing it, as proposed in Proposal #77 [1]. This is heavily based on a patch from fryguybob. Updates stm submodule. [1] https://github.com/ghc-proposals/ghc-proposals/pull/77 Test Plan: Validate Reviewers: erikd, simonmar, hvr Reviewed By: simonmar Subscribers: rwbarton, thomie, carter GHC Trac Issues: #14310 Differential Revision: https://phabricator.haskell.org/D4760
Diffstat (limited to 'includes')
-rw-r--r--includes/Cmm.h1
-rw-r--r--includes/rts/storage/Closures.h18
-rw-r--r--includes/stg/MiscClosures.h5
3 files changed, 1 insertions, 23 deletions
diff --git a/includes/Cmm.h b/includes/Cmm.h
index 18b2aaf324..1306a2222d 100644
--- a/includes/Cmm.h
+++ b/includes/Cmm.h
@@ -799,7 +799,6 @@
#define NO_TREC stg_NO_TREC_closure
#define END_TSO_QUEUE stg_END_TSO_QUEUE_closure
#define STM_AWOKEN stg_STM_AWOKEN_closure
-#define END_INVARIANT_CHECK_QUEUE stg_END_INVARIANT_CHECK_QUEUE_closure
#define recordMutableCap(p, gen) \
W_ __bd; \
diff --git a/includes/rts/storage/Closures.h b/includes/rts/storage/Closures.h
index e52043c73c..15231e01f0 100644
--- a/includes/rts/storage/Closures.h
+++ b/includes/rts/storage/Closures.h
@@ -308,7 +308,7 @@ typedef struct StgTRecHeader_ StgTRecHeader;
typedef struct StgTVarWatchQueue_ {
StgHeader header;
- StgClosure *closure; // StgTSO or StgAtomicInvariant
+ StgClosure *closure; // StgTSO
struct StgTVarWatchQueue_ *next_queue_entry;
struct StgTVarWatchQueue_ *prev_queue_entry;
} StgTVarWatchQueue;
@@ -320,13 +320,6 @@ typedef struct {
StgInt volatile num_updates;
} StgTVar;
-typedef struct {
- StgHeader header;
- StgClosure *code;
- StgTRecHeader *last_execution;
- StgWord lock;
-} StgAtomicInvariant;
-
/* new_value == expected_value for read-only accesses */
/* new_value is a StgTVarWatchQueue entry when trec in state TREC_WAITING */
typedef struct {
@@ -355,25 +348,16 @@ typedef enum {
TREC_WAITING, /* Transaction currently waiting */
} TRecState;
-typedef struct StgInvariantCheckQueue_ {
- StgHeader header;
- StgAtomicInvariant *invariant;
- StgTRecHeader *my_execution;
- struct StgInvariantCheckQueue_ *next_queue_entry;
-} StgInvariantCheckQueue;
-
struct StgTRecHeader_ {
StgHeader header;
struct StgTRecHeader_ *enclosing_trec;
StgTRecChunk *current_chunk;
- StgInvariantCheckQueue *invariants_to_check;
TRecState state;
};
typedef struct {
StgHeader header;
StgClosure *code;
- StgTVarWatchQueue *next_invariant_to_check;
StgClosure *result;
} StgAtomicallyFrame;
diff --git a/includes/stg/MiscClosures.h b/includes/stg/MiscClosures.h
index 758ec1f51e..a976b6b5fd 100644
--- a/includes/stg/MiscClosures.h
+++ b/includes/stg/MiscClosures.h
@@ -143,12 +143,9 @@ RTS_ENTRY(stg_raise);
RTS_ENTRY(stg_raise_ret);
RTS_ENTRY(stg_atomically);
RTS_ENTRY(stg_TVAR_WATCH_QUEUE);
-RTS_ENTRY(stg_INVARIANT_CHECK_QUEUE);
-RTS_ENTRY(stg_ATOMIC_INVARIANT);
RTS_ENTRY(stg_TREC_CHUNK);
RTS_ENTRY(stg_TREC_HEADER);
RTS_ENTRY(stg_END_STM_WATCH_QUEUE);
-RTS_ENTRY(stg_END_INVARIANT_CHECK_QUEUE);
RTS_ENTRY(stg_END_STM_CHUNK_LIST);
RTS_ENTRY(stg_NO_TREC);
RTS_ENTRY(stg_COMPACT_NFDATA_CLEAN);
@@ -179,7 +176,6 @@ RTS_CLOSURE(stg_dummy_ret_closure);
RTS_CLOSURE(stg_forceIO_closure);
RTS_CLOSURE(stg_END_STM_WATCH_QUEUE_closure);
-RTS_CLOSURE(stg_END_INVARIANT_CHECK_QUEUE_closure);
RTS_CLOSURE(stg_END_STM_CHUNK_LIST_closure);
RTS_CLOSURE(stg_NO_TREC_closure);
@@ -471,7 +467,6 @@ RTS_FUN_DECL(stg_newTVarzh);
RTS_FUN_DECL(stg_readTVarzh);
RTS_FUN_DECL(stg_readTVarIOzh);
RTS_FUN_DECL(stg_writeTVarzh);
-RTS_FUN_DECL(stg_checkzh);
RTS_FUN_DECL(stg_unpackClosurezh);
RTS_FUN_DECL(stg_getApStackValzh);