diff options
author | markster <markster@f38db490-d61c-443f-a65b-d21fe96a405b> | 2003-08-13 15:25:16 +0000 |
---|---|---|
committer | markster <markster@f38db490-d61c-443f-a65b-d21fe96a405b> | 2003-08-13 15:25:16 +0000 |
commit | dbc9edcaac6ec1d2059f4c5bcd27cca6c266f5bf (patch) | |
tree | 3f2cc11c392b1496cf6518e8b6eb99e8b04417a1 /include/asterisk/linkedlists.h | |
parent | 231b9aad4020331a8c68d1a2826ee1ef930ec57b (diff) |
Totally revamp thread debugging to support locating and removing deadlocks
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@1310 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'include/asterisk/linkedlists.h')
-rwxr-xr-x | include/asterisk/linkedlists.h | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/include/asterisk/linkedlists.h b/include/asterisk/linkedlists.h index c1a3d9de3..30e09a015 100755 --- a/include/asterisk/linkedlists.h +++ b/include/asterisk/linkedlists.h @@ -2,25 +2,26 @@ #define ASTERISK_LINKEDLISTS_H #include <pthread.h> +#include <asterisk/lock.h> #define AST_LIST_LOCK(head) \ - ast_pthread_mutex_lock(&head->lock) + ast_mutex_lock(&head->lock) #define AST_LIST_UNLOCK(head) \ - ast_pthread_mutex_unlock(&head->lock) + ast_mutex_unlock(&head->lock) #define AST_LIST_HEAD(name, type) \ struct name { \ struct type *first; \ - pthread_mutex_t lock; \ + ast_mutex_t lock; \ } #define AST_LIST_HEAD_INITIALIZER(head) \ - { NULL, PTHREAD_MUTEX_INITIALIZER } + { NULL, AST_MUTEX_INITIALIZER } #define AST_LIST_HEAD_SET(head,entry) do { \ (head)->first=(entry); \ - pthread_mutex_init(&(head)->lock,NULL); \ + ast_pthread_mutex_init(&(head)->lock,NULL); \ } while (0) #define AST_LIST_ENTRY(type) \ @@ -39,7 +40,7 @@ struct { \ #define AST_LIST_HEAD_INIT(head) { \ (head)->first = NULL; \ - pthread_mutex_init(&(head)->lock,NULL); \ + ast_pthread_mutex_init(&(head)->lock,NULL); \ } #define AST_LIST_INSERT_AFTER(listelm, elm, field) do { \ |