[libc-commits] [libc] [libc] Implement simple lock-free stack data structure (PR #83026)

Schrodinger ZHU Yifan via libc-commits libc-commits at lists.llvm.org
Mon Feb 26 10:59:17 PST 2024


SchrodingerZhu wrote:

Given that the stack is of a fixed size (i.e. there cannot be too many different tags). Is ABA still a concern? 

-----

I am not exactly sure about the GPU's assumption. On CPU ends, the dtor list used by `atexit` should be MPSC and the  consumptions can only happen at the end of the program without concurrency. ~~There is no concurrent reclamation of the stack cell at all. ~~

I was wrong, the exit call can be initiated at multiple threads concurrently.

https://github.com/llvm/llvm-project/pull/83026


More information about the libc-commits mailing list