[libc-commits] [libc] [libc][stdlib] Remove LIBC_THREAD_LOCAL from rand_next (PR #96245)
Roland McGrath via libc-commits
libc-commits at lists.llvm.org
Tue Jun 25 18:03:19 PDT 2024
frobtech wrote:
> I feel like updating this with a CAS loop is a good middle-ground #96692. This also lets the GPU implementation actually work, since previously I couldn't statically initialize it to 1. Though, it's not like CAS loops are cheap, but I didn't want to use actual locks since they're a PITA to make work on the GPU (see the RPC implementation).
I concur that the single atomic is the best approach for this case.
https://github.com/llvm/llvm-project/pull/96245
More information about the libc-commits
mailing list