[asterisk-commits] twilson: branch twilson/calendaring r182593 - in /team/twilson/calendaring: a...
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Tue Mar 17 11:48:42 CDT 2009
Author: twilson
Date: Tue Mar 17 11:48:38 2009
New Revision: 182593
URL: http://svn.digium.com/svn-view/asterisk?view=rev&rev=182593
Log:
More differences with trunk
Modified:
team/twilson/calendaring/apps/app_playtones.c
team/twilson/calendaring/include/asterisk/heap.h
team/twilson/calendaring/main/heap.c
team/twilson/calendaring/tests/test_heap.c
team/twilson/calendaring/tests/test_sched.c
Modified: team/twilson/calendaring/apps/app_playtones.c
URL: http://svn.digium.com/svn-view/asterisk/team/twilson/calendaring/apps/app_playtones.c?view=diff&rev=182593&r1=182592&r2=182593
==============================================================================
--- team/twilson/calendaring/apps/app_playtones.c (original)
+++ team/twilson/calendaring/apps/app_playtones.c Tue Mar 17 11:48:38 2009
@@ -27,7 +27,7 @@
#include "asterisk.h"
-ASTERISK_FILE_VERSION(__FILE__, "$Revision: 176627 $")
+ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include "asterisk/module.h"
#include "asterisk/pbx.h"
Modified: team/twilson/calendaring/include/asterisk/heap.h
URL: http://svn.digium.com/svn-view/asterisk/team/twilson/calendaring/include/asterisk/heap.h?view=diff&rev=182593&r1=182592&r2=182593
==============================================================================
--- team/twilson/calendaring/include/asterisk/heap.h (original)
+++ team/twilson/calendaring/include/asterisk/heap.h Tue Mar 17 11:48:38 2009
@@ -49,6 +49,8 @@
*
* \note This implementation is of a max heap. However, if a min heap is
* desired, simply swap the return values of this function.
+ *
+ * \since 1.6.1
*/
typedef int (*ast_heap_cmp_fn)(void *elm1, void *elm2);
@@ -93,9 +95,16 @@
* \endcode
*
* \return An instance of a max heap
- */
+ * \since 1.6.1
+ */
+#ifdef MALLOC_DEBUG
+struct ast_heap *_ast_heap_create(unsigned int init_height, ast_heap_cmp_fn cmp_fn,
+ ssize_t index_offset, const char *file, int lineno, const char *func);
+#define ast_heap_create(a,b,c) _ast_heap_create(a,b,c,__FILE__,__LINE__,__PRETTY_FUNCTION__)
+#else
struct ast_heap *ast_heap_create(unsigned int init_height, ast_heap_cmp_fn cmp_fn,
ssize_t index_offset);
+#endif
/*!
* \brief Destroy a max heap
@@ -103,6 +112,7 @@
* \param h the heap to destroy
*
* \return NULL for convenience
+ * \since 1.6.1
*/
struct ast_heap *ast_heap_destroy(struct ast_heap *h);
@@ -114,8 +124,14 @@
*
* \retval 0 success
* \retval non-zero failure
- */
+ * \since 1.6.1
+ */
+#ifdef MALLOC_DEBUG
+int _ast_heap_push(struct ast_heap *h, void *elm, const char *file, int lineno, const char *func);
+#define ast_heap_push(a,b) _ast_heap_push(a,b,__FILE__,__LINE__,__PRETTY_FUNCTION__)
+#else
int ast_heap_push(struct ast_heap *h, void *elm);
+#endif
/*!
* \brief Pop the max element off of the heap
@@ -126,6 +142,7 @@
* largest value according to the element comparison function that was
* provided when the heap was created. The element will be removed before
* being returned.
+ * \since 1.6.1
*/
void *ast_heap_pop(struct ast_heap *h);
@@ -139,6 +156,7 @@
*
* \note the index_offset parameter to ast_heap_create() is required to be able
* to use this function.
+ * \since 1.6.1
*/
void *ast_heap_remove(struct ast_heap *h, void *elm);
@@ -177,6 +195,7 @@
* ast_heap_unlock(h);
*
* \endcode
+ * \since 1.6.1
*/
void *ast_heap_peek(struct ast_heap *h, unsigned int index);
@@ -186,41 +205,45 @@
* \param h the heap
*
* \return the number of elements currently in the heap
+ * \since 1.6.1
*/
size_t ast_heap_size(struct ast_heap *h);
/*!
* \brief Write-Lock a heap
*
- * \arg h the heap
+ * \param h the heap
*
* A lock is provided for convenience. It can be assumed that none of the
* ast_heap API calls are thread safe. This lock does not have to be used
* if another one is already available to protect the heap.
*
* \return see the documentation for pthread_rwlock_wrlock()
+ * \since 1.6.1
*/
int ast_heap_wrlock(struct ast_heap *h);
/*!
* \brief Read-Lock a heap
*
- * \arg h the heap
+ * \param h the heap
*
* A lock is provided for convenience. It can be assumed that none of the
* ast_heap API calls are thread safe. This lock does not have to be used
* if another one is already available to protect the heap.
*
* \return see the documentation for pthread_rwlock_rdlock()
+ * \since 1.6.1
*/
int ast_heap_rdlock(struct ast_heap *h);
/*!
* \brief Unlock a heap
*
- * \arg h the heap
+ * \param h the heap
*
* \return see the documentation for pthread_rwlock_unlock()
+ * \since 1.6.1
*/
int ast_heap_unlock(struct ast_heap *h);
@@ -234,6 +257,7 @@
*
* \note This function is mostly for debugging purposes. It traverses an existing
* heap and verifies that every node is properly placed relative to its children.
+ * \since 1.6.1
*/
int ast_heap_verify(struct ast_heap *h);
Modified: team/twilson/calendaring/main/heap.c
URL: http://svn.digium.com/svn-view/asterisk/team/twilson/calendaring/main/heap.c?view=diff&rev=182593&r1=182592&r2=182593
==============================================================================
--- team/twilson/calendaring/main/heap.c (original)
+++ team/twilson/calendaring/main/heap.c Tue Mar 17 11:48:38 2009
@@ -25,7 +25,7 @@
#include "asterisk.h"
-ASTERISK_FILE_VERSION(__FILE__, "$Revision: 181028 $")
+ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include "asterisk/heap.h"
#include "asterisk/utils.h"
Modified: team/twilson/calendaring/tests/test_heap.c
URL: http://svn.digium.com/svn-view/asterisk/team/twilson/calendaring/tests/test_heap.c?view=diff&rev=182593&r1=182592&r2=182593
==============================================================================
--- team/twilson/calendaring/tests/test_heap.c (original)
+++ team/twilson/calendaring/tests/test_heap.c Tue Mar 17 11:48:38 2009
@@ -25,7 +25,7 @@
#include "asterisk.h"
-ASTERISK_FILE_VERSION(__FILE__, "$Revision: 176635 $")
+ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include "asterisk/module.h"
#include "asterisk/cli.h"
Modified: team/twilson/calendaring/tests/test_sched.c
URL: http://svn.digium.com/svn-view/asterisk/team/twilson/calendaring/tests/test_sched.c?view=diff&rev=182593&r1=182592&r2=182593
==============================================================================
--- team/twilson/calendaring/tests/test_sched.c (original)
+++ team/twilson/calendaring/tests/test_sched.c Tue Mar 17 11:48:38 2009
@@ -27,7 +27,7 @@
#include <inttypes.h>
-ASTERISK_FILE_VERSION(__FILE__, "$Revision: 178022 $")
+ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include "asterisk/module.h"
#include "asterisk/cli.h"
More information about the asterisk-commits
mailing list