diff options
author | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-10-19 01:00:57 +0000 |
---|---|---|
committer | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-10-19 01:00:57 +0000 |
commit | 21cbb8bb6832b87a3fe1dcc915c0ac69a9a7c73a (patch) | |
tree | 5a78268aec79198822639f0fcdc73bbc41984d18 /main/logger.c | |
parent | 6a1a45a5205299fb33bae0358d0e6f38e2987f4f (diff) |
Extend the thread storage API such that a custom initialization function can
be called for each thread specific object after they are allocated. Note that
there was already the ability to define a custom cleanup function. Also, if
the custom cleanup function is used, it *MUST* call free on the thread
specific object at the end. There is no way to have this magically done that
I can think of because the cleanup function registered with the pthread
implementation will only call the function back with a pointer to the
thread specific object, not the parent ast_threadstorage object.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@45623 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main/logger.c')
-rw-r--r-- | main/logger.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/main/logger.c b/main/logger.c index a8e5c3700..bd876317a 100644 --- a/main/logger.c +++ b/main/logger.c @@ -137,10 +137,10 @@ static int colors[] = { COLOR_BRGREEN }; -AST_THREADSTORAGE(verbose_buf, verbose_buf_init); +AST_THREADSTORAGE(verbose_buf); #define VERBOSE_BUF_INIT_SIZE 128 -AST_THREADSTORAGE(log_buf, log_buf_init); +AST_THREADSTORAGE(log_buf); #define LOG_BUF_INIT_SIZE 128 static int make_components(char *s, int lineno) |