[asterisk-commits] tilghman: branch 1.6.1 r177760 - in /branches/1.6.1: ./ include/asterisk/
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Fri Feb 20 15:34:29 CST 2009
Author: tilghman
Date: Fri Feb 20 15:34:28 2009
New Revision: 177760
URL: http://svn.digium.com/svn-view/asterisk?view=rev&rev=177760
Log:
Merged revisions 177732 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk
................
r177732 | tilghman | 2009-02-20 15:25:37 -0600 (Fri, 20 Feb 2009) | 10 lines
Merged revisions 177701 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r177701 | tilghman | 2009-02-20 15:15:01 -0600 (Fri, 20 Feb 2009) | 3 lines
This exception does not appear to still be true for Solaris 10, and OpenSolaris definitely needs it to be removed.
Fixed for snuff-home on -dev channel.
........
................
Modified:
branches/1.6.1/ (props changed)
branches/1.6.1/include/asterisk/threadstorage.h
Propchange: branches/1.6.1/
------------------------------------------------------------------------------
Binary property 'trunk-merged' - no diff available.
Modified: branches/1.6.1/include/asterisk/threadstorage.h
URL: http://svn.digium.com/svn-view/asterisk/branches/1.6.1/include/asterisk/threadstorage.h?view=diff&rev=177760&r1=177759&r2=177760
==============================================================================
--- branches/1.6.1/include/asterisk/threadstorage.h (original)
+++ branches/1.6.1/include/asterisk/threadstorage.h Fri Feb 20 15:34:28 2009
@@ -60,12 +60,6 @@
int (*custom_init)(void *); /*!< Custom initialization function specific to the object */
};
-#ifdef SOLARIS
-#define THREADSTORAGE_ONCE_INIT {PTHREAD_ONCE_INIT}
-#else
-#define THREADSTORAGE_ONCE_INIT PTHREAD_ONCE_INIT
-#endif
-
#if defined(DEBUG_THREADLOCALS)
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);
@@ -105,32 +99,32 @@
*/
#if !defined(DEBUG_THREADLOCALS)
#define AST_THREADSTORAGE_CUSTOM(name, c_init, c_cleanup) \
-static void __init_##name(void); \
-static struct ast_threadstorage name = { \
- .once = THREADSTORAGE_ONCE_INIT, \
- .key_init = __init_##name, \
- .custom_init = c_init, \
-}; \
-static void __init_##name(void) \
-{ \
- pthread_key_create(&(name).key, c_cleanup); \
+static void __init_##name(void); \
+static struct ast_threadstorage name = { \
+ .once = PTHREAD_ONCE_INIT, \
+ .key_init = __init_##name, \
+ .custom_init = c_init, \
+}; \
+static void __init_##name(void) \
+{ \
+ pthread_key_create(&(name).key, c_cleanup); \
}
#else /* defined(DEBUG_THREADLOCALS) */
-#define AST_THREADSTORAGE_CUSTOM(name, c_init, c_cleanup) \
-static void __init_##name(void); \
-static struct ast_threadstorage name = { \
- .once = THREADSTORAGE_ONCE_INIT, \
- .key_init = __init_##name, \
- .custom_init = c_init, \
-}; \
-static void __cleanup_##name(void *data) \
-{ \
- __ast_threadstorage_object_remove(data); \
- c_cleanup(data); \
-} \
-static void __init_##name(void) \
-{ \
- pthread_key_create(&(name).key, __cleanup_##name); \
+#define AST_THREADSTORAGE_CUSTOM_SCOPE(name, c_init, c_cleanup, scope) \
+static void __init_##name(void); \
+static struct ast_threadstorage name = { \
+ .once = PTHREAD_ONCE_INIT, \
+ .key_init = __init_##name, \
+ .custom_init = c_init, \
+}; \
+static void __cleanup_##name(void *data) \
+{ \
+ __ast_threadstorage_object_remove(data); \
+ c_cleanup(data); \
+} \
+static void __init_##name(void) \
+{ \
+ pthread_key_create(&(name).key, __cleanup_##name); \
}
#endif /* defined(DEBUG_THREADLOCALS) */
More information about the asterisk-commits
mailing list