Subject: Re: nsswitch.conf and irs.conf
To: None <>
From: Noriyuki Soda <>
List: tech-net
Date: 01/21/2003 14:35:43
>>>>> On Tue, 21 Jan 2003 14:26:37 +0900, said:

>> - Using thread specific data has certain overhead on both
>> time and space.

> 	it's a tradeoff against code duplication and extra maintenance
>	 headache.

It is NOT tradeoff.
If one has a reentrant implementation, non-reentrant interface like
gethostbyname(3) can be written as a call to the reentrant
implementation. So, there is no need to duplicate code.

>> - Using thread specific data makes code maintainability worse.

> 	i don't think you have read through IRS library, have you?

Well, No.

> 	it always pass around pointer to struct net_data, 

At least gethostbyname_r(3) doesn't pass per-thread data as a pointer.
Or are you claiming that gethostbyname_r(3) is passing it?

>> - It may make problems about reusability of our code.

> 	this is totally nonsense.  feel free to tell this to BIND8 developers.

Do you know why did bind8 people make gethostbyname(3) thread safe,
in spite of the fact that it is not needed?