[asterisk-dev] Re: [asterisk-commits] russell: trunk r48019 - in /trunk/include/asterisk: threadstorage.h utils.h

Nic Bellamy nicb-lists at vadacom.co.nz
Tue Nov 28 17:52:08 MST 2006


Kevin P. Fleming wrote:

>Luigi Rizzo wrote:
>  
>
>>On Sun, Nov 26, 2006 at 06:55:34AM -0000, asterisk-commits at lists.digium.com wrote:
>>    
>>
>>>Author: russell
>>>Date: Sun Nov 26 00:55:33 2006
>>>New Revision: 48019
>>>
>>>URL: http://svn.digium.com/view/asterisk?view=rev&rev=48019
>>>Log:
>>>- Add some comments on thread storage with a brief explanation of what it is
>>>  as well as what the motivation is for using it.
>>>- Add a comment by the declaration of ast_inet_ntoa() noting that this function
>>>  is not reentrant, and the result of a previous call to the function is no
>>>  longer valid after calling it again.
>>>      
>>>
>>thanks - much appreciated.
>>    
>>
>
>I'll be pedantic here... 'reentrant' is not the correct word to use,
>since this function cannot be convinced to call itself (so there is no
>'re-entry' into the same function).
>  
>
I think you're confusing re-entrant with recursive :-)

In the books I have on POSIX threads, plus the manpages for various 
(g)libc functions, re-entrant is the term used to describe functions 
that can be called concurrently from multiple threads without problems 
(and conversely, things like ctime() - "this function is not 
re-entrant"). I'd suggest sticking with this usage.

Cheers,
    Nic.

-- 
Nic Bellamy,
Head Of Engineering, Vadacom Ltd - http://www.vadacom.co.nz/



More information about the asterisk-dev mailing list