aboutsummaryrefslogtreecommitdiffstats
path: root/include/asterisk/utils.h
diff options
context:
space:
mode:
authorrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2006-11-26 06:55:33 +0000
committerrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2006-11-26 06:55:33 +0000
commit481ef16004ff2e18615d16185d885929943dd2c1 (patch)
tree27f5dafc52841bc4a34f1306553a0f513afa6855 /include/asterisk/utils.h
parentd6bbc3a58c6331d867484df0fc4b3b8c3192c06c (diff)
- 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. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@48019 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'include/asterisk/utils.h')
-rw-r--r--include/asterisk/utils.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/asterisk/utils.h b/include/asterisk/utils.h
index 30e9523e2..3fb817980 100644
--- a/include/asterisk/utils.h
+++ b/include/asterisk/utils.h
@@ -218,6 +218,16 @@ static force_inline void ast_slinear_saturated_divide(short *input, short *value
int test_for_thread_safety(void);
+/*!
+ * \brief thread-safe replacement for inet_ntoa().
+ *
+ * \note It is very important to note that even though this is a thread-safe
+ * replacement for inet_ntoa(), it is *not* reentrant. In a single
+ * thread, the result from a previous call to this function is no longer
+ * valid once it is called again. If the result from multiple calls to
+ * this function need to be kept or used at once, then the result must be
+ * copied to a local buffer before calling this function again.
+ */
const char *ast_inet_ntoa(struct in_addr ia);
#ifdef inet_ntoa