diff options
author | George Joseph <george.joseph@fairview5.com> | 2014-06-06 14:12:57 +0000 |
---|---|---|
committer | George Joseph <george.joseph@fairview5.com> | 2014-06-06 14:12:57 +0000 |
commit | 077c4187d9789eaf585568f8178f5e3a470ab781 (patch) | |
tree | 9931ba097213a1f9cacf69b49500666bbd8140b9 /main/astobj2_private.h | |
parent | 4e292ea3af5484b10b6df9dddf6b718f3efc3d20 (diff) |
Split astobj2.c into more maintainable components.
Split astobj2.c into the following files to improve maintainability.
astobj2.c - object primitives, object primitive misc and initialization code.
astobj2_private.h - internal object declarations needed by the containers.
astobj2_container.c - generic conainer and container misc code.
astobj2_container_hash.c - hash container specific code.
astobj2_container_rbtree.c - rbtree container specific code.
astobj2_container_private.h - generic container definitions and rtti prototypes.
https://reviewboard.asterisk.org/r/3576/
........
Merged revisions 415317 from http://svn.asterisk.org/svn/asterisk/branches/12
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@415319 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'main/astobj2_private.h')
-rw-r--r-- | main/astobj2_private.h | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/main/astobj2_private.h b/main/astobj2_private.h new file mode 100644 index 000000000..79cb06cf6 --- /dev/null +++ b/main/astobj2_private.h @@ -0,0 +1,54 @@ +/* + * astobj2 - replacement containers for asterisk data structures. + * + * Copyright (C) 2006 Marta Carbone, Luigi Rizzo - Univ. di Pisa, Italy + * + * See http://www.asterisk.org for more information about + * the Asterisk project. Please do not directly contact + * any of the maintainers of this project for assistance; + * the project provides a web site, mailing lists and IRC + * channels for your use. + * + * This program is free software, distributed under the terms of + * the GNU General Public License Version 2. See the LICENSE file + * at the top of the source tree. + */ + +/*! \file + * + * \brief Common, private definitions for astobj2. + * + * \author Richard Mudgett <rmudgett@digium.com> + */ + +#ifndef ASTOBJ2_PRIVATE_H_ +#define ASTOBJ2_PRIVATE_H_ + +#include "asterisk/astobj2.h" + +#if defined(TEST_FRAMEWORK) +/* We are building with the test framework enabled so enable AO2 debug tests as well. */ +#define AO2_DEBUG 1 +#endif /* defined(TEST_FRAMEWORK) */ + +#if defined(AST_DEVMODE) +#define AO2_DEVMODE_STAT(stat) stat +#else +#define AO2_DEVMODE_STAT(stat) +#endif /* defined(AST_DEVMODE) */ + +#ifdef AO2_DEBUG +struct ao2_stats { + volatile int total_objects; + volatile int total_mem; + volatile int total_containers; + volatile int total_refs; + volatile int total_locked; +}; +extern struct ao2_stats ao2; +#endif + +int is_ao2_object(void *user_data); +enum ao2_lock_req __adjust_lock(void *user_data, enum ao2_lock_req lock_how, int keep_stronger); + +#endif /* ASTOBJ2_PRIVATE_H_ */ |