]> git.lttng.org Git - userspace-rcu.git/commitdiff
Document cmm_cast_volatile
authorOlivier Dion <odion@efficios.com>
Thu, 21 Nov 2024 16:54:55 +0000 (11:54 -0500)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mon, 2 Dec 2024 18:20:30 +0000 (13:20 -0500)
Change-Id: I3ce8df69a967b3bdaf940c4db06fd775e5b9eccb
Signed-off-by: Olivier Dion <odion@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
include/urcu/compiler.h

index 6254252ca8350dc4aabe134dc7665a89ea9a5fdf..e027c130100ea00b2078601317ba2bdca3a5c84a 100644 (file)
 
 /*
  * Helper to add the volatile qualifier to a pointer.
+ *
+ * This is used to enforce volatile accesses even when using atomic
+ * builtins. Indeed, C11 atomic operations all work on volatile memory
+ * accesses, but this is not documented for compiler atomic builtins.
+ *
+ * This could prevent certain classes of optimization from the compiler such
+ * as load/store fusing.
  */
 #if defined __cplusplus
 template <typename T>
This page took 0.033427 seconds and 4 git commands to generate.