[Asterisk-cvs] asterisk/include/asterisk lock.h,1.13,1.14
markster at lists.digium.com
markster at lists.digium.com
Mon Apr 12 16:52:16 CDT 2004
Update of /usr/cvsroot/asterisk/include/asterisk
In directory mongoose.digium.com:/tmp/cvs-serv16147/include/asterisk
Modified Files:
lock.h
Log Message:
Revert locking changes which break static locks (even on linux since it's part of an ENUM not define)
Index: lock.h
===================================================================
RCS file: /usr/cvsroot/asterisk/include/asterisk/lock.h,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -d -r1.13 -r1.14
--- lock.h 12 Apr 2004 19:56:32 -0000 1.13
+++ lock.h 12 Apr 2004 20:54:24 -0000 1.14
@@ -19,17 +19,6 @@
#define AST_PTHREADT_NULL (pthread_t) -1
#define AST_PTHREADT_STOP (pthread_t) -2
-/* From now on, Asterisk REQUIRES Recursive (not error checking) mutexes
- and will not run without them. */
-
-#ifdef PTHREAD_MUTEX_RECURSIVE_NP
-#define AST_MUTEX_INITIALIZER PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP
-#define AST_MUTEX_KIND PTHREAD_MUTEX_RECURSIVE_NP
-#else
-#define AST_MUTEX_INITIALIZER PTHREAD_MUTEX_INITIALIZER
-#define AST_MUTEX_KIND PTHREAD_MUTEX_RECURSIVE
-#endif
-
#ifdef DEBUG_THREADS
#ifdef THREAD_CRASH
@@ -41,6 +30,12 @@
#include <stdio.h>
#include <unistd.h>
+/* 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;
char *file;
@@ -159,6 +154,11 @@
#define pthread_mutex_destroy use_ast_pthread_mutex_destroy_instead_of_pthread_mutex_destroy
#else /* DEBUG_THREADS */
+
+/* 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
typedef pthread_mutex_t ast_mutex_t;
More information about the svn-commits
mailing list