diff options
author | Benoit Germain <benoit.germain@ubisoft.com> | 2024-11-13 10:41:01 +0100 |
---|---|---|
committer | Benoit Germain <benoit.germain@ubisoft.com> | 2024-11-13 10:41:01 +0100 |
commit | 9e8930f02e7a53a41b713c642bcb53b3b61f7cb5 (patch) | |
tree | 60251c62749d5a3ab1e9c5f088ecf362a56cb192 /src/universe.hpp | |
parent | f45a3f5de2a11065764c87208d3f0b58e6ebe771 (diff) | |
download | lanes-9e8930f02e7a53a41b713c642bcb53b3b61f7cb5.tar.gz lanes-9e8930f02e7a53a41b713c642bcb53b3b61f7cb5.tar.bz2 lanes-9e8930f02e7a53a41b713c642bcb53b3b61f7cb5.zip |
Cleaning up guano
Lane::selfdestruct_next and Universe::selfdestructFirst do not need to be volatile or anything else, all accesses are mutex-protected
Diffstat (limited to 'src/universe.hpp')
-rw-r--r-- | src/universe.hpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/universe.hpp b/src/universe.hpp index 18e125f..a45ce86 100644 --- a/src/universe.hpp +++ b/src/universe.hpp | |||
@@ -113,7 +113,8 @@ class Universe | |||
113 | std::atomic<int> debugspewIndentDepth{ 0 }; | 113 | std::atomic<int> debugspewIndentDepth{ 0 }; |
114 | #endif // USE_DEBUG_SPEW() | 114 | #endif // USE_DEBUG_SPEW() |
115 | 115 | ||
116 | Lane* volatile selfdestructFirst{ nullptr }; | 116 | // access is protected by selfDestructMutex |
117 | Lane* selfdestructFirst{ nullptr }; | ||
117 | // After a lane has removed itself from the chain, it still performs some processing. | 118 | // After a lane has removed itself from the chain, it still performs some processing. |
118 | // The terminal desinit sequence should wait for all such processing to terminate before force-killing threads | 119 | // The terminal desinit sequence should wait for all such processing to terminate before force-killing threads |
119 | std::atomic<int> selfdestructingCount{ 0 }; | 120 | std::atomic<int> selfdestructingCount{ 0 }; |