libtool-patches
[Top][All Lists]
Advanced

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

Re: [RFC] pre-c89 in libltdl


From: Simon Josefsson
Subject: Re: [RFC] pre-c89 in libltdl
Date: Tue, 20 Apr 2004 11:28:13 +0200
User-agent: Gnus/5.110002 (No Gnus v0.2) Emacs/21.3.50 (gnu/linux)

Alexandre Oliva <address@hidden> writes:

> According to the POSIX standards, all of the dl* functions are
> supposed to be thread safe.  However, not all implementations are, so
> it's nice that libltdl makes it easier to get POSIX-like behavior out
> of non-POSIX implementations.

This is what I was unsure about, do you have a reference for this?  I
only found:

http://www.opengroup.org/onlinepubs/007904975/functions/dlopen.html

Which doesn't mention threads at all.  Now that I read more, I see
this for dlerror:

     The dlerror() function need not be reentrant. A function that is
     not required to be reentrant is not required to be thread-safe.

If POSIX dlopen are indeed thread safe, I think I will use them
directly, instead of libltdl, without surrounding the calls with
thread mutexes, and document that my package require POSIX/threadsafe
dlopen.  To check if the system have POSIX dlopen, I could check for
the function itself, and that _POSIX_VERSION >= 200112L.




reply via email to

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