reentrant functions

Bernhard Reutner-Fischer rep.dot.nop at gmail.com
Thu Sep 11 16:46:28 UTC 2008


On Thu, Sep 11, 2008 at 04:22:55PM +0200, Bernhard Reutner-Fischer wrote:
>On Tue, Sep 09, 2008 at 05:41:40PM +0200, Bernhard Reutner-Fischer wrote:
>>On Tue, Sep 09, 2008 at 12:45:39PM +0200, Bernhard Reutner-Fischer wrote:
>>>On Sun, Jun 08, 2008 at 02:18:03PM +0200, Bernd Schmidt wrote:
>>>> Bernhard Fischer wrote:
>>>>> Just to make sure i understand correctly:
>>>>>
>>>>> - If a reentrant function exists then you want the non-reentrant func to
>>>>>   be optional (via a central knob).
>>>>> - If non-reentrant funcs are off then they are aliased to their
>>>>>   reentrant counterpart.
>>>>
>>>> No, they have different calling conventions, so they'd just not exist.
>
>
>>What do people think about scandir(). Would you prefer to use readdir_r
>>for it or should it use a not publically visible __libc_readdir(DIR*)?
>>
>>Is it worthwile to put the definition of TTYNAME_BUFLEN into a private
>>ttyname.h or will everybody remember to keep the two in sync?
>>Alternatively it could come from the buildsystem, i have no preference.
>>
>>An unrelated hunk in the patch* above begs the question as to whether or
>>not __libc_sigaction() should use the rt_sigaction syscall internally
>>if the user turned off (the external API) UCLIBC_HAS_REALTIME.
>>rt_sigaction is currently used internally and back then i thought and
>>still think this is ok.  Opinions?

Perhaps somebody has time to test the attached patch.

	* libc/inet/resolv.c (res_init): Switch from random() to getpit() as id.
	Add disabled code to retry gethostbyaddr_r with a bigger buffer.
	* libc/termios/ttyname.c (ttyname_r): Move to ...
	* libc/termios/ttyname_r.c: ... here.
	* libc/unistd/getlogin.c (getlogin_r): Move to ...
	* libc/unistd/getlogin_r.c: ... here.
	* libc/misc/syslog/syslog.c (vsyslog): Use ctime_r() instead of
	ctime().
	* libc/misc/dirent/readdir.c (readdir): Unexport if requested.
	Adjust all callers.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: optional_non-reentrant.01.patch
Type: text/x-diff
Size: 33789 bytes
Desc: not available
Url : http://lists.busybox.net/pipermail/uclibc/attachments/20080911/c6e61d1d/attachment.bin 


More information about the uClibc mailing list