[asterisk-commits] russell: branch 1.6.2 r184514 - in /branches/1.6.2: ./ include/asterisk/ main/

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Thu Mar 26 20:37:30 CDT 2009


Author: russell
Date: Thu Mar 26 20:37:29 2009
New Revision: 184514

URL: http://svn.digium.com/svn-view/asterisk?view=rev&rev=184514
Log:
Merged revisions 184512 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/trunk

........
r184512 | russell | 2009-03-26 20:35:56 -0500 (Thu, 26 Mar 2009) | 2 lines

Pass more useful information through to lock tracking when DEBUG_THREADS is on.

........

Modified:
    branches/1.6.2/   (props changed)
    branches/1.6.2/include/asterisk/heap.h
    branches/1.6.2/main/heap.c

Propchange: branches/1.6.2/
------------------------------------------------------------------------------
--- trunk-merged (original)
+++ trunk-merged Thu Mar 26 20:37:29 2009
@@ -1,1 +1,1 @@
-/trunk:1-182359,182408,182450,182525,182530,182553,182722,182847,183028,183057,183108,183117,183242,183244,183321,183511,183560,183652,183701,183766,183865,183914,184037,184043,184079,184147,184151,184219-184220,184280,184339,184344,184448
+/trunk:1-182359,182408,182450,182525,182530,182553,182722,182847,183028,183057,183108,183117,183242,183244,183321,183511,183560,183652,183701,183766,183865,183914,184037,184043,184079,184147,184151,184219-184220,184280,184339,184344,184448,184512

Modified: branches/1.6.2/include/asterisk/heap.h
URL: http://svn.digium.com/svn-view/asterisk/branches/1.6.2/include/asterisk/heap.h?view=diff&rev=184514&r1=184513&r2=184514
==============================================================================
--- branches/1.6.2/include/asterisk/heap.h (original)
+++ branches/1.6.2/include/asterisk/heap.h Thu Mar 26 20:37:29 2009
@@ -209,6 +209,8 @@
  */
 size_t ast_heap_size(struct ast_heap *h);
 
+#ifndef DEBUG_THREADS
+
 /*!
  * \brief Write-Lock a heap
  *
@@ -247,6 +249,17 @@
  */
 int ast_heap_unlock(struct ast_heap *h);
 
+#else /* DEBUG_THREADS */
+
+#define ast_heap_wrlock(h) __ast_heap_wrlock(h, __FILE__, __PRETTY_FUNCTION__, __LINE__)
+int __ast_heap_wrlock(struct ast_heap *h, const char *file, const char *func, int line);
+#define ast_heap_rdlock(h) __ast_heap_rdlock(h, __FILE__, __PRETTY_FUNCTION__, __LINE__)
+int __ast_heap_rdlock(struct ast_heap *h, const char *file, const char *func, int line);
+#define ast_heap_unlock(h) __ast_heap_unlock(h, __FILE__, __PRETTY_FUNCTION__, __LINE__)
+int __ast_heap_unlock(struct ast_heap *h, const char *file, const char *func, int line);
+
+#endif /* DEBUG_THREADS */
+
 /*!
  * \brief Verify that a heap has been properly constructed
  *

Modified: branches/1.6.2/main/heap.c
URL: http://svn.digium.com/svn-view/asterisk/branches/1.6.2/main/heap.c?view=diff&rev=184514&r1=184513&r2=184514
==============================================================================
--- branches/1.6.2/main/heap.c (original)
+++ branches/1.6.2/main/heap.c Thu Mar 26 20:37:29 2009
@@ -302,6 +302,8 @@
 	return h->cur_len;
 }
 
+#ifndef DEBUG_THREADS
+
 int ast_heap_wrlock(struct ast_heap *h)
 {
 	return ast_rwlock_wrlock(&h->lock);
@@ -317,3 +319,21 @@
 	return ast_rwlock_unlock(&h->lock);
 }
 
+#else /* DEBUG_THREADS */
+
+int __ast_heap_wrlock(struct ast_heap *h, const char *file, const char *func, int line)
+{
+	return _ast_rwlock_wrlock(&h->lock, "&h->lock", file, line, func);
+}
+
+int __ast_heap_rdlock(struct ast_heap *h, const char *file, const char *func, int line)
+{
+	return _ast_rwlock_rdlock(&h->lock, "&h->lock", file, line, func);
+}
+
+int __ast_heap_unlock(struct ast_heap *h, const char *file, const char *func, int line)
+{
+	return _ast_rwlock_unlock(&h->lock, "&h->lock", file, line, func);
+}
+
+#endif /* DEBUG_THREADS */




More information about the asterisk-commits mailing list