mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-05 12:16:00 +00:00
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: https://origsvn.digium.com/svn/asterisk/trunk@45623 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -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)
|
||||
|
Reference in New Issue
Block a user