[libvirt] PATCH: 15/25: Prohibit non-threadsafe POSIX apis

Jim Meyering jim at meyering.net
Mon Jan 19 18:38:40 UTC 2009


"Daniel P. Berrange" <berrange at redhat.com> wrote:
> There are a huge list of functions in POSIX which are not
> safe to use from multiple threads currently. I generated
> the list by looking at all libc symbol exports for variants
> which have a parallel _r symbol.
>
>    nm -D --defined-only /lib/libc.so.6  \
>       | grep '_r$' \
>       | awk '{print $3}' \
>       | grep -v __ \
>       | grep -v qsort \
>       | grep -v readdir \
>       | sort \
>       | uniq \
>       | sed -e 's/_r//'

Nice.  ACK.

FYI, I get the identical list on x86_64 F10 with this:
nm -D --defined-only /lib64/libc.so.6 \
  | perl -nle '/ ([^_]\w+)_r$/ and print $1'|grep -vE 'qsort|readdir'




More information about the libvir-list mailing list