News for hackers. Stuff that matters.
Re:Lockless Algorithms for Mere Mortals by anaphor on Wednesday July 29, 2020 @09:35PM (#23993418)
C actually had better support (than C++) for double-checked locking (which is a lockless algorithm) up until relatively recently https://preshing.com/20130930/double-checked-locking-is-fixe...
Re:Lockless Algorithms for Mere Mortals by jcranmer on Thursday July 30, 2020 @12:40AM (#23994742)
False. The C standard had no consideration for thread semantics prior to C11, and C11's memory model is literally and explicitly derived from C++11's memory model (which itself is adapted from Java 5's memory model). All of the discussions about how the memory model semantics for C11 and C++11 actually work take place entirely within the C++ standards committee, as is true for most new C language features these days (with the C committee largely designing merely the spellings of the new features).
Re:Lockless Algorithms for Mere Mortals by lalaland1125 on Wednesday July 29, 2020 @11:02PM (#23994104)
Huh? Both C and C++ only added support for atomics and double-checked locking in the same year: 2011 (C11 for C and C++11 for C++). How did C support double checked locking before C++ when the standards were released contemporaneously?