Skip to content
Prev Previous commit
Next Next commit
Revert change to _Py_qsbr_advance().
Since _Py_atomic_add_uint64() returns the old value, we need to add
QSBR_INCR.
  • Loading branch information
nascheme committed Jun 17, 2025
commit d2f5acc113599265ff3f89a2d88653119a6ae002
2 changes: 1 addition & 1 deletion Python/qsbr.c
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ _Py_qsbr_advance(struct _qsbr_shared *shared)
// NOTE: with 64-bit sequence numbers, we don't have to worry too much
// about the wr_seq getting too far ahead of rd_seq, but if we ever use
// 32-bit sequence numbers, we'll need to be more careful.
return _Py_atomic_add_uint64(&shared->wr_seq, QSBR_INCR);
return _Py_atomic_add_uint64(&shared->wr_seq, QSBR_INCR) + QSBR_INCR;
}

uint64_t
Expand Down