Skip to content
Merged
Prev Previous commit
Next Next commit
Add comment about QSBR_LT/QSBR_LEQ
  • Loading branch information
colesbury committed Feb 15, 2024
commit 69d56690165e9992429e5371298aded06ab8423e
4 changes: 3 additions & 1 deletion Python/qsbr.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,9 @@
#include "pycore_pystate.h" // _PyThreadState_GET()


// Wrap-around safe comparison
// Wrap-around safe comparison. This is a holdover from the FreeBSD
// implementation, which uses 32-bit sequence numbers. We currently use 64-bit
// sequence numbers, so wrap-around is unlikely.
#define QSBR_LT(a, b) ((int64_t)((a)-(b)) < 0)
#define QSBR_LEQ(a, b) ((int64_t)((a)-(b)) <= 0)

Expand Down