[svn-commits] russell: branch 1.6.1 r184513 - in /branches/1.6.1: ./ include/asterisk/ main/

SVN commits to the Digium repositories svn-commits at lists.digium.com
Thu Mar 26 20:36:43 CDT 2009


Author: russell
Date: Thu Mar 26 20:36:42 2009
New Revision: 184513

URL: http://svn.digium.com/svn-view/asterisk?view=rev&rev=184513
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.1/   (props changed)
    branches/1.6.1/include/asterisk/heap.h
    branches/1.6.1/main/heap.c

Propchange: branches/1.6.1/
------------------------------------------------------------------------------
Binary property 'trunk-merged' - no diff available.

Modified: branches/1.6.1/include/asterisk/heap.h
URL: http://svn.digium.com/svn-view/asterisk/branches/1.6.1/include/asterisk/heap.h?view=diff&rev=184513&r1=184512&r2=184513
==============================================================================
--- branches/1.6.1/include/asterisk/heap.h (original)
+++ branches/1.6.1/include/asterisk/heap.h Thu Mar 26 20:36:42 2009
@@ -198,6 +198,8 @@
  */
 size_t ast_heap_size(struct ast_heap *h);
 
+#ifndef DEBUG_THREADS
+
 /*!
  * \brief Write-Lock a heap
  *
@@ -236,6 +238,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.1/main/heap.c
URL: http://svn.digium.com/svn-view/asterisk/branches/1.6.1/main/heap.c?view=diff&rev=184513&r1=184512&r2=184513
==============================================================================
--- branches/1.6.1/main/heap.c (original)
+++ branches/1.6.1/main/heap.c Thu Mar 26 20:36:42 2009
@@ -267,6 +267,8 @@
 	return h->cur_len;
 }
 
+#ifndef DEBUG_THREADS
+
 int ast_heap_wrlock(struct ast_heap *h)
 {
 	return ast_rwlock_wrlock(&h->lock);
@@ -282,3 +284,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 svn-commits mailing list