NetBSD-Users archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: dlopen, &c., and threads
Taylor R Campbell <campbell%mumble.net@localhost> wrote:
> I see nothing in src/libexec/ld.elf_so synchronizing concurrent uses
> of the dlopen family of functions in multiple threads. The SUS does
> not require them to be thread-safe, but is it intended, or documented
> anywhere, that these are not in NetBSD; or am I missing something
> about the implementation?
http://netbsd.gw.com/cgi-bin/man-cgi?dlopen++NetBSD-5.0
I see no mention of thread safety. As SUS doesn't require them to be
thread safe, there doesn't seem much point in making them so (they'd be
single threaded per-process in the kernel anyway, very likely) so you
might as well use a mutex in your application and be portable.
Disclaimer: I speak as one with more experience than I'd really like
working on threads implementations (kernel and libraries) but in my own
code I avoid threading wherever possible. Multiple cooperating
processes are usually cleaner IMHO, but that's not always possible, I
know. Especially when someone dumps an already written multithreaded
application on you. :-/
Cheers,
Giles
Home |
Main Index |
Thread Index |
Old Index