diff options
author | Ben Gamari <ben@smart-cactus.org> | 2019-10-01 17:19:30 +0000 |
---|---|---|
committer | Ben Gamari <ben@smart-cactus.org> | 2020-10-24 20:59:39 -0400 |
commit | 65136c134d1b6e2f2c5d7193fade3c99a8cb81c4 (patch) | |
tree | 4400dee96a752829af86fd0b2b47ea1ea841e0ee /rts | |
parent | a61f66d6c14762869ad95b7646bce975df9f80f8 (diff) | |
download | haskell-65136c134d1b6e2f2c5d7193fade3c99a8cb81c4.tar.gz |
rts/Capability: Intialize interrupt field
Previously this was left uninitialized.
Also clarify some comments.
Diffstat (limited to 'rts')
-rw-r--r-- | rts/Capability.c | 1 | ||||
-rw-r--r-- | rts/Capability.h | 4 |
2 files changed, 5 insertions, 0 deletions
diff --git a/rts/Capability.c b/rts/Capability.c index aedce0dd8e..181075b963 100644 --- a/rts/Capability.c +++ b/rts/Capability.c @@ -306,6 +306,7 @@ initCapability (Capability *cap, uint32_t i) cap->free_trec_headers = NO_TREC; cap->transaction_tokens = 0; cap->context_switch = 0; + cap->interrupt = 0; cap->pinned_object_block = NULL; cap->pinned_object_blocks = NULL; diff --git a/rts/Capability.h b/rts/Capability.h index 82046c0b9e..87ec53801a 100644 --- a/rts/Capability.h +++ b/rts/Capability.h @@ -100,6 +100,8 @@ struct Capability_ { // Context switch flag. When non-zero, this means: stop running // Haskell code, and switch threads. + // + // Does not require lock to read or write. int context_switch; // Interrupt flag. Like the context_switch flag, this also @@ -110,6 +112,8 @@ struct Capability_ { // The interrupt flag is always reset before we start running // Haskell code, unlike the context_switch flag which is only // reset after we have executed the context switch. + // + // Does not require lock to read or write. int interrupt; // Total words allocated by this cap since rts start |