On Fri, Feb 24, 2023, at 16:11, David Marchand wrote: > This is a followup of the series that introduced lock annotations. > I reworked and made annotations work in what seemed the easier cases. > In most cases, I chose to convert inline wrappers around the EAL lock > API to simple macro: I did not see much value in those wrappers and this > is way simpler than adding __rte_*lock_function tags everywhere. > > A list of libraries and drivers still need more work as their code have > non obvious locks handling. For those components, the check is opted > out. > I leave it to their respective maintainers to enable the checks later. > > FreeBSD libc pthread API has lock annotations while Linux glibc has > none. > We could simply disable the check on FreeBSD, but having this check, > a few issues got raised in drivers that are built with FreeBSD. > For now, I went with a simple #ifdef FreeBSD for pthread mutex related > annotations in our code. >
Hi David, This is a great change, thanks for doing it. However I am not sure I understand the logic regarding the '#ifdef FREEBSD'. These annotations provide static hints to clang's thread safety analysis. What is the dependency on FreeBSD glibc? -- Gaetan Rivet