[Asterisk-cvs] asterisk/include/asterisk lock.h,1.9,1.10

markster at lists.digium.com markster at lists.digium.com
Tue Apr 6 16:08:19 CDT 2004


Update of /usr/cvsroot/asterisk/include/asterisk
In directory mongoose.digium.com:/tmp/cvs-serv28378/include/asterisk

Modified Files:
	lock.h 
Log Message:
Bite the bullet and require RECURSIVE mutexes


Index: lock.h
===================================================================
RCS file: /usr/cvsroot/asterisk/include/asterisk/lock.h,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- lock.h	1 Apr 2004 06:27:10 -0000	1.9
+++ lock.h	6 Apr 2004 20:08:44 -0000	1.10
@@ -30,22 +30,11 @@
 #include <stdio.h>
 #include <unistd.h>
 
-// #define AST_MUTEX_INITIALIZER      PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP
-// #define AST_MUTEX_KIND             PTHREAD_MUTEX_RECURSIVE_NP
-#ifdef PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP
-#define AST_MUTEX_INITIALIZER         { PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP, NULL, 0, NULL, 0 }
-#else
-#ifdef PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP
-#define AST_MUTEX_INITIALIZER         { PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP, NULL, 0, NULL, 0 }
-#else
-#define AST_MUTEX_INITIALIZER         { PTHREAD_MUTEX_INITIALIZER, NULL, 0, NULL, 0 }
-#endif
-#endif
-#ifdef PTHREAD_MUTEX_ERRORCHECK_NP
-#define AST_MUTEX_KIND                PTHREAD_MUTEX_ERRORCHECK_NP
-#else
-#define AST_MUTEX_KIND                PTHREAD_MUTEX_ERRORCHECK
-#endif
+/* From now on, Asterisk REQUIRES Recursive (not error checking) mutexes
+   and will not run without them. */
+
+#define AST_MUTEX_INITIALIZER      PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP
+#define AST_MUTEX_KIND             PTHREAD_MUTEX_RECURSIVE_NP
 
 struct ast_mutex_info {
 	pthread_mutex_t mutex;




More information about the svn-commits mailing list