[lttng-dev] [PATCH 0/7] Replace the custom code with gcc/clang __atomic builtins

Ondřej Surý ondrej at sury.org
Fri Mar 17 17:37:48 EDT 2023


Hi,

(this is my first time using git send-email, so I apologise in advance if
anything breaks).

Here's my attempt to convert the Userspace RCU to use __atomic builtins whenever
possible instead of custom assembly.

The __atomic builtins were first introduced in gcc 4.7.0 and clang 3.1.0.

Apart from simplifying the code, this should also help ThreadSanitizer to
understand the memory synchronization and report less (or no) warnings.

The code compiles and the tests passed (on amd64).

This is by no means complete, and most probably I missed or misunderstood
something, but it's a solid start, so I am submitting the patch set for
discussion and review.

Thanks,
--
Ondřej Surý <ondrej at sury.org>



More information about the lttng-dev mailing list