summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoshua Colp <jcolp@digium.com>2015-04-20 05:54:00 -0500
committerGerrit Code Review <gerrit2@gerrit.digium.api>2015-04-20 05:54:00 -0500
commit9581a0ebf3cd8035193167e5c07b627e050f78d2 (patch)
tree73a890aba1dd33f3fa7329c2b965d0a85c85d78e
parent82bc0fd3ade77394e13062b6097732c224e77eaa (diff)
parentc59a80070764f1989dbeca1d97c4e97717314c13 (diff)
Merge "Fix issue with AST_THREADSTORAGE_RAW when DEBUG_THREADLOCALS is enabled." into 13
-rw-r--r--include/asterisk/threadstorage.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/include/asterisk/threadstorage.h b/include/asterisk/threadstorage.h
index 4d587a5c7..4e61f42d2 100644
--- a/include/asterisk/threadstorage.h
+++ b/include/asterisk/threadstorage.h
@@ -64,6 +64,9 @@ struct ast_threadstorage {
void __ast_threadstorage_object_add(void *key, size_t len, const char *file, const char *function, unsigned int line);
void __ast_threadstorage_object_remove(void *key);
void __ast_threadstorage_object_replace(void *key_old, void *key_new, size_t len);
+#define THREADSTORAGE_RAW_CLEANUP(v) {}
+#else
+#define THREADSTORAGE_RAW_CLEANUP NULL
#endif /* defined(DEBUG_THREADLOCALS) */
/*!
@@ -85,7 +88,7 @@ void __ast_threadstorage_object_replace(void *key_old, void *key_new, size_t len
#define AST_THREADSTORAGE_EXTERNAL(name) \
extern struct ast_threadstorage name
#define AST_THREADSTORAGE_RAW(name) \
- AST_THREADSTORAGE_CUSTOM_SCOPE(name, NULL, NULL,)
+ AST_THREADSTORAGE_CUSTOM_SCOPE(name, NULL, THREADSTORAGE_RAW_CLEANUP,)
/*!
* \brief Define a thread storage variable, with custom initialization and cleanup