[asterisk-commits] mmichelson: branch mmichelson/threadpool r379127 - in /team/mmichelson/thread...
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Tue Jan 15 15:15:07 CST 2013
Author: mmichelson
Date: Tue Jan 15 15:15:04 2013
New Revision: 379127
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=379127
Log:
Add doxygen to accessors and increase refcount of taskprocessor before returning.
Modified:
team/mmichelson/threadpool/include/asterisk/taskprocessor.h
team/mmichelson/threadpool/include/asterisk/threadpool.h
team/mmichelson/threadpool/main/taskprocessor.c
Modified: team/mmichelson/threadpool/include/asterisk/taskprocessor.h
URL: http://svnview.digium.com/svn/asterisk/team/mmichelson/threadpool/include/asterisk/taskprocessor.h?view=diff&rev=379127&r1=379126&r2=379127
==============================================================================
--- team/mmichelson/threadpool/include/asterisk/taskprocessor.h (original)
+++ team/mmichelson/threadpool/include/asterisk/taskprocessor.h Tue Jan 15 15:15:04 2013
@@ -111,7 +111,22 @@
void (*shutdown)(struct ast_taskprocessor_listener *listener);
};
+/*!
+ * \brief Get a reference to the listener's taskprocessor
+ *
+ * This will return the taskprocessor with its reference count increased. Release
+ * the reference to this object by using ast_taskprocessor_unreference()
+ *
+ * \param listener The listener that has the taskprocessor
+ * \return The taskprocessor
+ */
struct ast_taskprocessor *ast_taskprocessor_listener_get_tps(const struct ast_taskprocessor_listener *listener);
+
+/*!
+ * \brief Get the user data from the listener
+ * \param listener The taskprocessor listener
+ * \return The listener's user data
+ */
void *ast_taskprocessor_listener_get_user_data(const struct ast_taskprocessor_listener *listener);
/*!
Modified: team/mmichelson/threadpool/include/asterisk/threadpool.h
URL: http://svnview.digium.com/svn/asterisk/team/mmichelson/threadpool/include/asterisk/threadpool.h?view=diff&rev=379127&r1=379126&r2=379127
==============================================================================
--- team/mmichelson/threadpool/include/asterisk/threadpool.h (original)
+++ team/mmichelson/threadpool/include/asterisk/threadpool.h Tue Jan 15 15:15:04 2013
@@ -114,6 +114,11 @@
struct ast_threadpool_listener *ast_threadpool_listener_alloc(
const struct ast_threadpool_listener_callbacks *callbacks, void *user_data);
+/*!
+ * \brief Get the threadpool listener's user data
+ * \param listener The threadpool listener
+ * \return The user data
+ */
void *ast_threadpool_listener_get_user_data(const struct ast_threadpool_listener *listener);
/*!
Modified: team/mmichelson/threadpool/main/taskprocessor.c
URL: http://svnview.digium.com/svn/asterisk/team/mmichelson/threadpool/main/taskprocessor.c?view=diff&rev=379127&r1=379126&r2=379127
==============================================================================
--- team/mmichelson/threadpool/main/taskprocessor.c (original)
+++ team/mmichelson/threadpool/main/taskprocessor.c Tue Jan 15 15:15:04 2013
@@ -495,6 +495,7 @@
struct ast_taskprocessor *ast_taskprocessor_listener_get_tps(const struct ast_taskprocessor_listener *listener)
{
+ ao2_ref(listener->tps, +1);
return listener->tps;
}
More information about the asterisk-commits
mailing list