Skip to content
Snippets Groups Projects
Commit 672e3e49 authored by Mark Spencer's avatar Mark Spencer
Browse files

Bite the bullet and require RECURSIVE mutexes

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2640 65c4cc65-6c06-0410-ace0-fbb531ad65f3
parent 1d8f780f
Branches
Tags
No related merge requests found
...@@ -30,22 +30,11 @@ ...@@ -30,22 +30,11 @@
#include <stdio.h> #include <stdio.h>
#include <unistd.h> #include <unistd.h>
// #define AST_MUTEX_INITIALIZER PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP /* From now on, Asterisk REQUIRES Recursive (not error checking) mutexes
// #define AST_MUTEX_KIND PTHREAD_MUTEX_RECURSIVE_NP and will not run without them. */
#ifdef PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP
#define AST_MUTEX_INITIALIZER { PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP, NULL, 0, NULL, 0 } #define AST_MUTEX_INITIALIZER PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP
#else #define AST_MUTEX_KIND PTHREAD_MUTEX_RECURSIVE_NP
#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
struct ast_mutex_info { struct ast_mutex_info {
pthread_mutex_t mutex; pthread_mutex_t mutex;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment