Conversation

Thinking about applications for an ABA-free Treiber stack, sans Pop() and augmented with PopAll() and PushList(). No need for pointer tagging, obv application is an MPSC queue with the usual 2-stack construction (atomic-free for consumer), also might work for remote freelist in allocator

2
0
0

@pkhuong for sure, I like the atomic-free consumer tho (typical use for PopAll)

1
0
0

@tobinbaker yeah, i also like the direct support for batch push.

0
0
0
@tobinbaker Careful of lifetime-end pointer zap! Treiber wrote in assembly language, thus no zap worries. Working to fix this issue: https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2025/p2414r10.pdf
1
0
1

@paulmckrcu I assume that if a compiler breaks my code, it will also break a ton of other code, so I’m not too worried about trigger-happy optimizations exploiting pointer validity :)

1
0
0
@tobinbaker Let's just say that I have been working with C compilers for more than forty years, and have noticed certain trends. ;-)
0
0
2