[asterisk-commits] dlee: branch dlee/tp-local r399843 - /team/dlee/tp-local/include/asterisk/

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Wed Sep 25 15:36:30 CDT 2013


Author: dlee
Date: Wed Sep 25 15:36:29 2013
New Revision: 399843

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=399843
Log:
Doc comments

Modified:
    team/dlee/tp-local/include/asterisk/taskprocessor.h

Modified: team/dlee/tp-local/include/asterisk/taskprocessor.h
URL: http://svnview.digium.com/svn/asterisk/team/dlee/tp-local/include/asterisk/taskprocessor.h?view=diff&rev=399843&r1=399842&r2=399843
==============================================================================
--- team/dlee/tp-local/include/asterisk/taskprocessor.h (original)
+++ team/dlee/tp-local/include/asterisk/taskprocessor.h Wed Sep 25 15:36:29 2013
@@ -175,13 +175,17 @@
  */
 struct ast_taskprocessor *ast_taskprocessor_create_with_listener(const char *name, struct ast_taskprocessor_listener *listener);
 
-void ast_taskprocessor_set_local(struct ast_taskprocessor *tps,
-	void *local_data);
-
-struct ast_taskprocessor_local {
-	void *local_data;
-	void *data;
-};
+/*!
+ * \brief Sets the local data associated with a taskprocessor.
+ *
+ * \since 12.0.0
+ *
+ * See ast_taskprocessor_push_local().
+ *
+ * \param tps Task processor.
+ * \param local_data Local data to associate with \a tps.
+ */
+void ast_taskprocessor_set_local(struct ast_taskprocessor *tps, void *local_data);
 
 /*!
  * \brief Unreference the specified taskprocessor and its reference count will decrement.
@@ -205,7 +209,31 @@
  */
 int ast_taskprocessor_push(struct ast_taskprocessor *tps, int (*task_exe)(void *datap), void *datap);
 
-int ast_taskprocessor_push_local(struct ast_taskprocessor *tps, int (*task_exe)(struct ast_taskprocessor_local *local), void *datap);
+/*! \brief Local data parameter */
+struct ast_taskprocessor_local {
+	/*! Local data, associated with the taskprocessor. */
+	void *local_data;
+	/*! Data pointer passed with this task. */
+	void *data;
+};
+
+/*!
+ * \brief Push a task into the specified taskprocessor queue and signal the
+ * taskprocessor thread.
+ *
+ * The callback receives a \ref ast_taskprocessor_local struct, which contains
+ * both the provided \a datap pointer, and any local data set on the
+ * taskprocessor with ast_taskprocessor_set_local().
+ *
+ * \param tps The taskprocessor structure
+ * \param task_exe The task handling function to push into the taskprocessor queue
+ * \param datap The data to be used by the task handling function
+ * \retval 0 success
+ * \retval -1 failure
+ * \since 12.0.0
+ */
+int ast_taskprocessor_push_local(struct ast_taskprocessor *tps,
+	int (*task_exe)(struct ast_taskprocessor_local *local), void *datap);
 
 /*!
  * \brief Pop a task off the taskprocessor and execute it.




More information about the asterisk-commits mailing list