[Openmp-commits] [PATCH] D19878: Use C++11 atomics for ticket locks implementation

Paul Osmialowski via Openmp-commits openmp-commits at lists.llvm.org
Mon May 23 11:19:56 PDT 2016

pawosm01 added a comment.

Nah, I don't like this idea of making 'self' field atomic - it leads to nasty casting of pointers (e.g. you can't do atomic store of NULL or nullptr to atomic pointer of certain type without ugly casting). I don't like the idea of removing self-pointer and leaving only boolean 'initialized' field either - checking whether self equals lck is a whole point of those sanity check functions. I think it should be left as it is and only missing atomic store in the __kmp_release_ticket_lock_with_checks() requires immediate attention.



More information about the Openmp-commits mailing list