linphone-developers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Linphone-developers] [belle-sip commit] Replaced readdir_r by readdir a


From: Andrey Gursky
Subject: [Linphone-developers] [belle-sip commit] Replaced readdir_r by readdir as the first one as been deprecated
Date: Sun, 12 Feb 2017 01:19:13 +0100

Hi,

I'd have a couple of questions regarding your usage of readdir() [1].

man page [2]:
> In the current POSIX.1 specification (POSIX.1-2008), readdir() is not
> required to be thread-safe.  However, in modern implementations
> (including the glibc implementation), concurrent calls to readdir()
> that specify different directory streams are thread-safe.

belle-sip must work not only on GNU/Linux with glibc, but also on other
platforms or different libc implementations (e.g. musl, Android's
bionic). Are you sure they are also modern enough to be thread-safe?

man page [2]:
> In cases where multiple threads must read from the same directory
> stream, using readdir() with external synchronization is still
> preferable to the use of the deprecated readdir_r(3) function.

Have you ensured, that belle-sip does never make such concurrent calls
(for the same directory stream), which after switch to readdir() must
be explicitly protected?

Thanks,
Andrey

[1] 
https://github.com/BelledonneCommunications/belle-sip/commit/bcb9b2389c2e7f55813c59306bf42f58b3a6b633
[2] http://man7.org/linux/man-pages/man3/readdir.3.html



reply via email to

[Prev in Thread] Current Thread [Next in Thread]