aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authormarkster <markster@f38db490-d61c-443f-a65b-d21fe96a405b>2004-04-12 20:54:24 +0000
committermarkster <markster@f38db490-d61c-443f-a65b-d21fe96a405b>2004-04-12 20:54:24 +0000
commit4df8ed3091477c59c45a018acc2007eb25425095 (patch)
tree2b86c51f9df3ab7bbd8bbde1d221588b53c1badc /include
parentf7af9592a08d9c5ef145e33c3193beef661c1a97 (diff)
Revert locking changes which break static locks (even on linux since it's part of an ENUM not define)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@2679 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'include')
-rwxr-xr-xinclude/asterisk/lock.h22
1 files changed, 11 insertions, 11 deletions
diff --git a/include/asterisk/lock.h b/include/asterisk/lock.h
index f09daa505..70a08abce 100755
--- a/include/asterisk/lock.h
+++ b/include/asterisk/lock.h
@@ -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;
@@ -160,6 +155,11 @@ static inline int __ast_pthread_mutex_destroy(char *filename, int lineno, char *
#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;
#define ast_mutex_lock(t) pthread_mutex_lock(t)