News for hackers. Stuff that matters.
Re:What's up with this new memory_order_consume memory order? by EscapeFromNY on Wednesday May 24, 2023 @09:09AM (#36057490)
So consume was added as a more surgical version of acquire. I see why that's useful. Why didn't they also add a surgical version of release? Wouldn't that also be useful in the same situations where consume is useful?
Re:What's up with this new memory_order_consume memory order? by gpderetta on Wednesday May 24, 2023 @10:41AM (#36058808)
consume was implemented because real architectures provide data dependency on the load path (i.e. a load of a pointer value is never reordered past the a load of the pointed value). No architecture provides such a guarantee on the store path, unless , like TSO, provides it for all stores, so no point in specifying it in the standard.
Re:What's up with this new memory_order_consume memory order? by EscapeFromNY on Wednesday May 24, 2023 @02:11PM (#36061958)
Thanks, that makes sense