lock: Improve performance of DEBUG_THREADS.

Add a volatile flag to lock tracking structures so we only need to use
the global lock when first initializing tracking.

Additionally add support for DEBUG_THREADS_LOOSE_ABI.  This is used by
astobj2.c to eliminate storage for tracking fields when DEBUG_THREADS is
not defined.

Change-Id: Iabd650908901843e9fff47ef1c539f0e1b8cb13b
This commit is contained in:
Corey Farrell
2018-09-27 20:32:21 -04:00
parent 70e4f6f203
commit 205c6be895
4 changed files with 81 additions and 90 deletions

View File

@@ -25,6 +25,10 @@
<support_level>core</support_level>
***/
/* This reduces the size of lock structures within astobj2 objects when
* DEBUG_THREADS is not defined. */
#define DEBUG_THREADS_LOOSE_ABI
#include "asterisk.h"
#include "asterisk/_private.h"