Skip to content

Commit

Permalink
Correct mask, add a clarifying comment to it
Browse files Browse the repository at this point in the history
Signed-off-by: Isaev, Ilya <[email protected]>
  • Loading branch information
isaevil committed Nov 28, 2024
1 parent 13aae55 commit 6538eca
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/tbb/arena.h
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,9 @@ class thread_leave_manager {
static const std::uint64_t ONE_TIME_FAST_LEAVE = 1 << 1;
static const std::uint64_t DELAYED_LEAVE = 1 << 2;
static const std::uint64_t PARALLEL_BLOCK = 1 << 3;
static const std::uint64_t PARALLEL_BLOCK_MASK = ~((1LLU << 32) - 1) & ~(0x7);
// Use 29 bits for the parallel block state + reference counter,
// reserve 32 most significant bits.
static const std::uint64_t PARALLEL_BLOCK_MASK = ((1LLU << 32) - 1) & (PARALLEL_BLOCK - 1);

std::atomic<std::uint64_t> my_state{0};
public:
Expand Down

0 comments on commit 6538eca

Please sign in to comment.