This is the mail archive of the libc-alpha@sources.redhat.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]