On Thu, 19 Jan 2023 19:46:12 +0100 David Marchand <david.march...@redhat.com> wrote:
> clang offers some thread safety checks, statically verifying that locks > are taken and released in the code. > To use those checks, the full code leading to taking or releasing locks > must be annotated with some attributes. > > Wrap those attributes into our own set of macros. > > rwlock, seqlock and the "normal" spinlock are instrumented. > > Those checks might be of interest out of DPDK, but it requires that the > including application locks are annotated. > On the other hand, applications out there might have been using > those same checks. > To be on the safe side, keep this instrumentation under a > RTE_ANNOTATE_LOCKS internal build flag. > > A component may en/disable this check by setting > annotate_locks = true/false in its meson.build. Could this be made to work with sparse as well?