diff options
author | Ömer Sinan Ağacan <omeragacan@gmail.com> | 2018-09-24 16:21:27 +0300 |
---|---|---|
committer | Ömer Sinan Ağacan <omeragacan@gmail.com> | 2018-09-24 16:21:50 +0300 |
commit | d90946cea1357d3e99805c27dab1e811785a4088 (patch) | |
tree | d0de72599c28102b28bd532d25979bb5533577d6 /includes/rts | |
parent | e68b439fe5de61b9a2ca51af472185c62ccb8b46 (diff) | |
download | haskell-d90946cea1357d3e99805c27dab1e811785a4088.tar.gz |
Fix a MSG_BLACKHOLE sanity check, add some comments
Reviewers: simonmar, bgamari, erikd
Reviewed By: simonmar
Subscribers: rwbarton, carter
GHC Trac Issues: #15508
Differential Revision: https://phabricator.haskell.org/D5178
Diffstat (limited to 'includes/rts')
-rw-r--r-- | includes/rts/storage/Closures.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/includes/rts/storage/Closures.h b/includes/rts/storage/Closures.h index 15231e01f0..7db67c708e 100644 --- a/includes/rts/storage/Closures.h +++ b/includes/rts/storage/Closures.h @@ -130,10 +130,13 @@ typedef struct { typedef struct StgBlockingQueue_ { StgHeader header; - struct StgBlockingQueue_ *link; // here so it looks like an IND + struct StgBlockingQueue_ *link; + // here so it looks like an IND, to be able to skip the queue without + // deleting it (done in wakeBlockingQueue()) StgClosure *bh; // the BLACKHOLE StgTSO *owner; struct MessageBlackHole_ *queue; + // holds TSOs blocked on `bh` } StgBlockingQueue; typedef struct { @@ -400,6 +403,8 @@ typedef struct MessageThrowTo_ { typedef struct MessageBlackHole_ { StgHeader header; struct MessageBlackHole_ *link; + // here so it looks like an IND, to be able to skip the message without + // deleting it (done in throwToMsg()) StgTSO *tso; StgClosure *bh; } MessageBlackHole; |