This is the mail archive of the
libc-alpha@sources.redhat.com
mailing list for the glibc project.
Re: nss_dns addons and thread safety
- From: Roland McGrath <roland at redhat dot com>
- To: George Beshers <gbeshers at comcast dot net>
- Cc: libc-alpha <libc-alpha at sources dot redhat dot com>
- Date: Thu, 24 Jun 2004 17:56:30 -0700
- Subject: Re: nss_dns addons and thread safety
> Other than patching is there a good way to add thread-specific state
> (e.g., by extending _res) so that the socket can remain open between
> calls? I think that all I really need to store is the file descriptor.
If you want to make your module require TLS support, which requires pretty
new gcc and binutils, and on some platforms like x86 requires a not ancient
kernel, use a __thread variable. If you want to make your module link
against -lpthread, which nowadays is fine to do regardless of whether the
the calling program used -lpthread or not itself, then you can use the
pthread_setspecific et al interface.
> 2) Ideally, I would like to re-use the domain searching code but I don't
> see a hook into the send mechanism that would allow me to do that.
> [I don't feel that qhook and rhook are appropriate since the user might
> doing something with them.] Suggestions welcome.
Be specific about what code you would like to be able to call more easily.
> 3) Finally, IPv6 status/todo list?
There may be some loose ends Ulrich knows about, but it is mostly in shape
I believe.